29.01.2013, 04:53
Ok, i was too proud and didn't want to ask tried to make it all by myself but i simple couldn't do it...
I want to prevent a player to get into some vehicles... but i get some errors,
CODE:
Errors:
Line 3406: new str[300];
Line 5815: if(gClass == CLASS_SOLDIER)
Line 5826: }
}
}
I want to prevent a player to get into some vehicles... but i get some errors,
CODE:
pawn Код:
if(gClass == CLASS_PILOT)
if(oldstate == PLAYER_STATE_ONFOOT && newstate == PLAYER_STATE_DRIVER)
{
new veh, Float:x,Float:y,Float:z;
veh = GetPlayerVehicleID(playerid);
if(veh > 425 || 447 || 464 || 476 || 520)
GetPlayerPos(playerid, x,y,z);
SetPlayerPos(playerid, x,y,z+1);
}else return SendClientMessage(playerid, red, "[ERROR]: You need to be a pilot to fly this vehicle");
return 1;
}
}
pawn Код:
C:\Users\Guille\Desktop\Samp scripting\Server23\Server\gamemodes\WD.pwn(3406) : warning 219: local variable "str" shadows a variable at a preceding level
C:\Users\Guille\Desktop\Samp scripting\Server23\Server\gamemodes\WD.pwn(5815) : error 033: array must be indexed (variable "gClass")
C:\Users\Guille\Desktop\Samp scripting\Server23\Server\gamemodes\WD.pwn(5826) : error 010: invalid function or declaration
Line 5815: if(gClass == CLASS_SOLDIER)
Line 5826: }
}
}