29.03.2011, 17:20
hey there
I got this problem with jacking
The define
the cars add:
then the command
dcmd(jack,4,cmdtext);
I got this problem with jacking
The define
Код:
new jacar_First,jacar_Last;
Код:
#define IsAJackAble(%0) (jacar_First <= (%0) <= jacar_Last)
Код:
jacar_First = AddStaticVehicleEx(426,893.13018799,-1658.10461426,13.36687469,180.00000000,-1,-1,10000); //Premier AddStaticVehicleEx(466,887.97174072,-1668.82861328,13.46687508,0.00000000,-1,-1,10000); //Glendale AddStaticVehicleEx(529,1063.51867676,-1772.33984375,13.09715843,270.00000000,-1,-1,10000); //Willard AddStaticVehicleEx(585,1098.65600586,-1766.82727051,13.04896259,90.00000000,-1,-1,10000); //Emperor AddStaticVehicleEx(507,1086.07128906,-1371.49780273,13.73124981,181.50000000,-1,-1,10000); //Elegant AddStaticVehicleEx(498,-529.34808350,-472.51901245,25.73343658,179.00000000,-1,-1,10000); //Boxville AddStaticVehicleEx(543,1025.41394043,1795.11071777,10.77031231,264.00000000,-1,-1,10000); //Sadler AddStaticVehicleEx(467,1112.06945801,1767.50207520,10.69031239,0.00000000,-1,-1,10000); //Oceanic AddStaticVehicleEx(516,1116.54296875,2264.51611328,16.61874962,0.00000000,-1,-1,10000); //Nebula jacar_Last = AddStaticVehicleEx(445,1116.71069336,2195.98071289,16.70874977,0.00000000,-1,-1,10000); //Admiral
then the command
dcmd(jack,4,cmdtext);
Код:
dcmd_jack(playerid,newstate,params[]) { #pragma unused params if(PlayerInfo[playerid][pJob] != 1) return SendClientMessage(playerid,COLOR_AFOR,"You are not a car jacker !"); if(PlayerInfo[playerid][pJob] == 1) { if( newstate == PLAYER_STATE_DRIVER ) { newstate = GetPlayerVehicleID(playerid); if(IsAJackAble(newstate)) { //blablabla } } } return 1; }
Код:
error 035: argument type mismatch (argument 2)