Quote:
Originally Posted by Kinglee
pawn Код:
CMD:superjump( playerid, params[ ] ) { #pragma unused params if(PlayerInfo[playerid][SjKey] == 0) { PlayerInfo[playerid][SjKey] = 0; SendClientMessage(playerid, COLOR_RED, "{00FFCC}[AFS]{FF0000}You turned off Super Jump {00FF00}(/Superjump)"); } else { PlayerInfo[playerid][SjKey] = 1; SendClientMessage(playerid, COLOR_RED, "{00FFCC}[AFS]{FF0000}You turned on Super Jump. Press {00FF00}LShift {FF0000}to use it"); } }
|
Your code will turn off superjump when it's already turned off, and it will turn it on when it's already on.
Use this instead.
pawn Код:
CMD:superjump(playerid)
{
if(PlayerInfo[playerid][SjKey] == 1)
{
PlayerInfo[playerid][SjKey] = 0;
SendClientMessage(playerid, COLOR_RED, "{00FFCC}[AFS]{FF0000}You turned off Super Jump {00FF00}(/Superjump)");
}
else
{
PlayerInfo[playerid][SjKey] = 1;
SendClientMessage(playerid, COLOR_RED, "{00FFCC}[AFS]{FF0000}You turned on Super Jump. Press {00FF00}LShift {FF0000}to use it");
}
return 1;
}