2
2
#define samp_h
3
3
#include <Python.h>
4
4
#include "sampgdk.h"
5
+ #include "consts.h"
5
6
6
7
static PyObject * pysamp_createactor (PyObject * self , PyObject * args )
7
8
{
@@ -1449,13 +1450,13 @@ static PyObject* pysamp_getplayerstate(PyObject *self, PyObject *args)
1449
1450
static PyObject * pysamp_getplayerip (PyObject * self , PyObject * args )
1450
1451
{
1451
1452
int arg2 = -1 ;
1452
- char * arg1 = new char [arg2 ];
1453
1453
int arg0 = -1 ;
1454
1454
if (!PyArg_ParseTuple (args , "ii:GetPlayerIp" , & arg0 , & arg2 ))
1455
1455
{
1456
1456
PyErr_Print ();
1457
1457
return NULL ;
1458
1458
}
1459
+ char * arg1 = new char [arg2 ];
1459
1460
bool ret = GetPlayerIp (arg0 , arg1 , arg2 );
1460
1461
PyObject * out = Py_BuildValue ("s" , arg1 );
1461
1462
delete [] arg1 ;
@@ -1507,13 +1508,13 @@ static PyObject* pysamp_getplayerkeys(PyObject *self, PyObject *args)
1507
1508
static PyObject * pysamp_getplayername (PyObject * self , PyObject * args )
1508
1509
{
1509
1510
int arg2 = -1 ;
1510
- char * arg1 = new char [arg2 ];
1511
1511
int arg0 = -1 ;
1512
1512
if (!PyArg_ParseTuple (args , "ii:GetPlayerName" , & arg0 , & arg2 ))
1513
1513
{
1514
1514
PyErr_Print ();
1515
1515
return NULL ;
1516
1516
}
1517
+ char * arg1 = new char [arg2 ];
1517
1518
int ret = GetPlayerName (arg0 , arg1 , arg2 );
1518
1519
PyObject * out = Py_BuildValue ("s" , arg1 );
1519
1520
delete [] arg1 ;
@@ -2244,14 +2245,14 @@ static PyObject* pysamp_setpvarstring(PyObject *self, PyObject *args)
2244
2245
static PyObject * pysamp_getpvarstring (PyObject * self , PyObject * args )
2245
2246
{
2246
2247
int arg3 = -1 ;
2247
- char * arg2 = new char [arg3 ];
2248
2248
const char * arg1 = "" ;
2249
2249
int arg0 = -1 ;
2250
2250
if (!PyArg_ParseTuple (args , "isi:GetPVarString" , & arg0 , & arg1 , & arg3 ))
2251
2251
{
2252
2252
PyErr_Print ();
2253
2253
return NULL ;
2254
2254
}
2255
+ char * arg2 = new char [arg3 ];
2255
2256
bool ret = GetPVarString (arg0 , arg1 , arg2 , arg3 );
2256
2257
PyObject * out = Py_BuildValue ("s" , arg2 );
2257
2258
delete [] arg1 ;
@@ -2321,14 +2322,14 @@ static PyObject* pysamp_getpvarsupperindex(PyObject *self, PyObject *args)
2321
2322
static PyObject * pysamp_getpvarnameatindex (PyObject * self , PyObject * args )
2322
2323
{
2323
2324
int arg3 = -1 ;
2324
- char * arg2 = new char [arg3 ];
2325
2325
int arg1 = -1 ;
2326
2326
int arg0 = -1 ;
2327
2327
if (!PyArg_ParseTuple (args , "iii:GetPVarNameAtIndex" , & arg0 , & arg1 , & arg3 ))
2328
2328
{
2329
2329
PyErr_Print ();
2330
2330
return NULL ;
2331
2331
}
2332
+ char * arg2 = new char [arg3 ];
2332
2333
bool ret = GetPVarNameAtIndex (arg0 , arg1 , arg2 , arg3 );
2333
2334
PyObject * out = Py_BuildValue ("s" , arg2 );
2334
2335
delete [] arg2 ;
@@ -2507,15 +2508,15 @@ static PyObject* pysamp_getplayeranimationindex(PyObject *self, PyObject *args)
2507
2508
static PyObject * pysamp_getanimationname (PyObject * self , PyObject * args )
2508
2509
{
2509
2510
int arg4 = -1 ;
2510
- char * arg3 = new char [arg4 ];
2511
2511
int arg2 = -1 ;
2512
- char * arg1 = new char [arg2 ];
2513
2512
int arg0 = -1 ;
2514
2513
if (!PyArg_ParseTuple (args , "iii:GetAnimationName" , & arg0 , & arg2 , & arg4 ))
2515
2514
{
2516
2515
PyErr_Print ();
2517
2516
return NULL ;
2518
2517
}
2518
+ char * arg3 = new char [arg4 ];
2519
+ char * arg1 = new char [arg2 ];
2519
2520
bool ret = GetAnimationName (arg0 , arg1 , arg2 , arg3 , arg4 );
2520
2521
PyObject * out = Py_BuildValue ("ss" , arg1 , arg3 );
2521
2522
delete [] arg1 ;
@@ -3436,13 +3437,13 @@ static PyObject* pysamp_setsvarstring(PyObject *self, PyObject *args)
3436
3437
static PyObject * pysamp_getsvarstring (PyObject * self , PyObject * args )
3437
3438
{
3438
3439
int arg2 = -1 ;
3439
- char * arg1 = new char [arg2 ];
3440
3440
const char * arg0 = "" ;
3441
3441
if (!PyArg_ParseTuple (args , "si:GetSVarString" , & arg0 , & arg2 ))
3442
3442
{
3443
3443
PyErr_Print ();
3444
3444
return NULL ;
3445
3445
}
3446
+ char * arg1 = new char [arg2 ];
3446
3447
bool ret = GetSVarString (arg0 , arg1 , arg2 );
3447
3448
PyObject * out = Py_BuildValue ("s" , arg1 );
3448
3449
delete [] arg0 ;
@@ -3508,13 +3509,13 @@ static PyObject* pysamp_getsvarsupperindex(PyObject *self, PyObject *args)
3508
3509
static PyObject * pysamp_getsvarnameatindex (PyObject * self , PyObject * args )
3509
3510
{
3510
3511
int arg2 = -1 ;
3511
- char * arg1 = new char [arg2 ];
3512
3512
int arg0 = -1 ;
3513
3513
if (!PyArg_ParseTuple (args , "ii:GetSVarNameAtIndex" , & arg0 , & arg2 ))
3514
3514
{
3515
3515
PyErr_Print ();
3516
3516
return NULL ;
3517
3517
}
3518
+ char * arg1 = new char [arg2 ];
3518
3519
bool ret = GetSVarNameAtIndex (arg0 , arg1 , arg2 );
3519
3520
PyObject * out = Py_BuildValue ("s" , arg1 );
3520
3521
delete [] arg1 ;
@@ -3752,13 +3753,13 @@ static PyObject* pysamp_setworldtime(PyObject *self, PyObject *args)
3752
3753
static PyObject * pysamp_getweaponname (PyObject * self , PyObject * args )
3753
3754
{
3754
3755
int arg2 = -1 ;
3755
- char * arg1 = new char [arg2 ];
3756
3756
int arg0 = -1 ;
3757
3757
if (!PyArg_ParseTuple (args , "ii:GetWeaponName" , & arg0 , & arg2 ))
3758
3758
{
3759
3759
PyErr_Print ();
3760
3760
return NULL ;
3761
3761
}
3762
+ char * arg1 = new char [arg2 ];
3762
3763
bool ret = GetWeaponName (arg0 , arg1 , arg2 );
3763
3764
PyObject * out = Py_BuildValue ("s" , arg1 );
3764
3765
delete [] arg1 ;
@@ -4072,13 +4073,13 @@ static PyObject* pysamp_sendrconcommand(PyObject *self, PyObject *args)
4072
4073
static PyObject * pysamp_getplayernetworkstats (PyObject * self , PyObject * args )
4073
4074
{
4074
4075
int arg2 = -1 ;
4075
- char * arg1 = new char [arg2 ];
4076
4076
int arg0 = -1 ;
4077
4077
if (!PyArg_ParseTuple (args , "ii:GetPlayerNetworkStats" , & arg0 , & arg2 ))
4078
4078
{
4079
4079
PyErr_Print ();
4080
4080
return NULL ;
4081
4081
}
4082
+ char * arg1 = new char [arg2 ];
4082
4083
bool ret = GetPlayerNetworkStats (arg0 , arg1 , arg2 );
4083
4084
PyObject * out = Py_BuildValue ("s" , arg1 );
4084
4085
delete [] arg1 ;
@@ -4088,12 +4089,12 @@ static PyObject* pysamp_getplayernetworkstats(PyObject *self, PyObject *args)
4088
4089
static PyObject * pysamp_getnetworkstats (PyObject * self , PyObject * args )
4089
4090
{
4090
4091
int arg1 = -1 ;
4091
- char * arg0 = new char [arg1 ];
4092
4092
if (!PyArg_ParseTuple (args , "i:GetNetworkStats" , & arg1 ))
4093
4093
{
4094
4094
PyErr_Print ();
4095
4095
return NULL ;
4096
4096
}
4097
+ char * arg0 = new char [arg1 ];
4097
4098
bool ret = GetNetworkStats (arg0 , arg1 );
4098
4099
PyObject * out = Py_BuildValue ("s" , arg0 );
4099
4100
delete [] arg0 ;
@@ -4103,13 +4104,13 @@ static PyObject* pysamp_getnetworkstats(PyObject *self, PyObject *args)
4103
4104
static PyObject * pysamp_getplayerversion (PyObject * self , PyObject * args )
4104
4105
{
4105
4106
int arg2 = -1 ;
4106
- char * arg1 = new char [arg2 ];
4107
4107
int arg0 = -1 ;
4108
4108
if (!PyArg_ParseTuple (args , "ii:GetPlayerVersion" , & arg0 , & arg2 ))
4109
4109
{
4110
4110
PyErr_Print ();
4111
4111
return NULL ;
4112
4112
}
4113
+ char * arg1 = new char [arg2 ];
4113
4114
bool ret = GetPlayerVersion (arg0 , arg1 , arg2 );
4114
4115
PyObject * out = Py_BuildValue ("s" , arg1 );
4115
4116
delete [] arg1 ;
@@ -4148,13 +4149,13 @@ static PyObject* pysamp_unblockipaddress(PyObject *self, PyObject *args)
4148
4149
static PyObject * pysamp_getservervarasstring (PyObject * self , PyObject * args )
4149
4150
{
4150
4151
int arg2 = -1 ;
4151
- char * arg1 = new char [arg2 ];
4152
4152
const char * arg0 = "" ;
4153
4153
if (!PyArg_ParseTuple (args , "si:GetServerVarAsString" , & arg0 , & arg2 ))
4154
4154
{
4155
4155
PyErr_Print ();
4156
4156
return NULL ;
4157
4157
}
4158
+ char * arg1 = new char [arg2 ];
4158
4159
bool ret = GetServerVarAsString (arg0 , arg1 , arg2 );
4159
4160
PyObject * out = Py_BuildValue ("s" , arg1 );
4160
4161
delete [] arg0 ;
@@ -4193,13 +4194,13 @@ static PyObject* pysamp_getservervarasbool(PyObject *self, PyObject *args)
4193
4194
static PyObject * pysamp_getconsolevarasstring (PyObject * self , PyObject * args )
4194
4195
{
4195
4196
int arg2 = -1 ;
4196
- char * arg1 = new char [arg2 ];
4197
4197
const char * arg0 = "" ;
4198
4198
if (!PyArg_ParseTuple (args , "si:GetConsoleVarAsString" , & arg0 , & arg2 ))
4199
4199
{
4200
4200
PyErr_Print ();
4201
4201
return NULL ;
4202
4202
}
4203
+ char * arg1 = new char [arg2 ];
4203
4204
bool ret = GetConsoleVarAsString (arg0 , arg1 , arg2 );
4204
4205
PyObject * out = Py_BuildValue ("s" , arg1 );
4205
4206
delete [] arg0 ;
@@ -4354,13 +4355,13 @@ static PyObject* pysamp_netstats_connectionstatus(PyObject *self, PyObject *args
4354
4355
static PyObject * pysamp_netstats_getipport (PyObject * self , PyObject * args )
4355
4356
{
4356
4357
int arg2 = -1 ;
4357
- char * arg1 = new char [arg2 ];
4358
4358
int arg0 = -1 ;
4359
4359
if (!PyArg_ParseTuple (args , "ii:NetStats_GetIpPort" , & arg0 , & arg2 ))
4360
4360
{
4361
4361
PyErr_Print ();
4362
4362
return NULL ;
4363
4363
}
4364
+ char * arg1 = new char [arg2 ];
4364
4365
bool ret = NetStats_GetIpPort (arg0 , arg1 , arg2 );
4365
4366
PyObject * out = Py_BuildValue ("s" , arg1 );
4366
4367
delete [] arg1 ;
@@ -5020,13 +5021,13 @@ static PyObject* pysamp_showplayerdialog(PyObject *self, PyObject *args)
5020
5021
static PyObject * pysamp_gpci (PyObject * self , PyObject * args )
5021
5022
{
5022
5023
int arg2 = -1 ;
5023
- char * arg1 = new char [arg2 ];
5024
5024
int arg0 = -1 ;
5025
5025
if (!PyArg_ParseTuple (args , "ii:gpci" , & arg0 , & arg2 ))
5026
5026
{
5027
5027
PyErr_Print ();
5028
5028
return NULL ;
5029
5029
}
5030
+ char * arg1 = new char [arg2 ];
5030
5031
bool ret = gpci (arg0 , arg1 , arg2 );
5031
5032
PyObject * out = Py_BuildValue ("s" , arg1 );
5032
5033
delete [] arg1 ;
0 commit comments