31.08.2010, 17:32
Yo, I just found a lock command for vehicles:
And I just get this error:
Thanks for the help
Код:
if(strcmp(cmdtext, "/lock", true)==0)
{
if(IsPlayerInAnyVehicle(playerid))
{
new State;
State = GetPlayerState(playerid);
if(State! = PLAYER_STATE_DRIVER)
{
SendClientMessage(playerid,COLOR_GREY,"You can only lock the doors as the driver.");
return 1;
}
new i;
new Float:pX, Float:pY, Float:pZ;
for(i=0;i<MAX_PLAYERS;i++)
{
if(i != playerid)
{
SetVehicleParamsForPlayer(GetPlayerVehicleID(playerid),i, 0, 1);
}
}
format(string, sizeof(string), "~r~Locked");
GameTextForPlayer(playerid, string, 3000, 5);
GetPlayerPos(playerid,pX,pY,pZ);
PlayerPlaySound(playerid,1056,pX,pY,pZ);
}
else
{
SendClientMessage(playerid, COLOR_GREY, "You're not in a vehicle!");
}
return 1;
}
Код:
expected token: ")", but found "!"

