24.02.2014, 18:51
Here you can see else:
And on this script shows error:
How to fix that?
Code:
pawn Код:
else
{
SendClientMessage(playerid,red,"You can't use this command!");
}
Код:
error 029: invalid expression, assumed zero
Code:
pawn Код:
new cartype = GetPlayerVehicleID(playerid);
new State=GetPlayerState(playerid);
{
if(GetPVarInt(playerid, "Admin") >= 1)
{
if(State!=PLAYER_STATE_DRIVER)
{
TogglePlayerControllable(playerid,0); // Freeze the player
SetTimerEx("Freeze", 2000, false, "i", playerid); // Timer for 4 seconds (not repeating timer, only called on the command)
SetPlayerPos(playerid,-200.9151,61.5312,5.2272);
GameTextForPlayer(playerid,"~r~Admin base!",2500,1);
return 1;
}
else if(IsPlayerInVehicle(playerid, cartype) == 1)
{
TogglePlayerControllable(playerid,0); // Freeze the player
SetTimerEx("Freeze", 2000, false, "i", playerid); // Timer for 4 seconds (not repeating timer, only called on the command)
SetVehiclePos(cartype,-200.9151,61.5312,5.2272);
SetVehicleZAngle(cartype,91);
GameTextForPlayer(playerid,"~r~Admin Base!",2500,1);
return 1;
}
else
{
TogglePlayerControllable(playerid,0); // Freeze the player
SetTimerEx("Freeze", 2000, false, "i", playerid); // Timer for 4 seconds (not repeating timer, only called on the command)
SetPlayerPos(playerid,-200.9151,61.5312,5.2272);
}
GameTextForPlayer(playerid,"~r~Admin Base!",2500,1);
return 1;
}
}
/*else
{
SendClientMessage(playerid,red,"You can't use this command!");
}*/
return 1;
}