10.09.2011, 01:48
Hello, I'm trying to make a command for admins only, and when I try to compile it, I get a message saying it crashed and it never compiles. This is what I got so far.
I have a feeling it's the
But I'm not sure. Any help would be appreciated.
pawn Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
if(strcmp("/test", cmdtext, true, 12) == 0)
{
if(AirBreakVar[playerid] == 0)
{
if (!IsPlayerAdmin(playerid)) return SendClientMessage, 0xFF0000FF, "You're not authorized to use this Command");
if(IsPlayerInAnyVehicle(playerid) == 0)
{
AirBreakVar[playerid] = 1;
SetCameraBehindPlayer(playerid);
TogglePlayerControllable(playerid, 0);
SendClientMessage(playerid, yellow, "Air Break on, /abset to change the move distance, /aboff to turn off");
}
else
{
SendClientMessage(playerid, red, "You can not activate Air Break when in a vehicle");
}
}
else
{
SendClientMessage(playerid, red, "Your Air Break is already on");
}
return 1;
}
pawn Код:
if (!IsPlayerAdmin(playerid)) return SendClientMessage, 0xFF0000FF, "You're not authorized to use this Command");