17.02.2015, 16:03
(
Последний раз редактировалось Nabster; 17.02.2015 в 16:18.
Причина: FIXED
)
The code works opposite,instead of showing me you have spawned jetpack it shows me the other message i set for player.
Код:
CMD:jetpack(playerid,params[])
{
new string[128],id,pName[MAX_PLAYER_NAME];
if(PInfo[playerid][Level] < 3)
return SendClientMessage(playerid,STEALTH_BLUE,"You need to be level 3 to give jetpacks.");
if(sscanf(params,"us",id))
{
if(!IsPlayerConnected(id))
return SendClientMessage(playerid,STEALTH_BLUE,"That player is not connected!");
GetPlayerName(playerid,pName,sizeof pName);
format(string,sizeof(string),"Administrator %s(ID:%d) has given you a jetpack.",pName,id);
SendClientMessage(id,COLOR_DARKORCHID,string);
SetPlayerSpecialAction(id, SPECIAL_ACTION_USEJETPACK);
}
else
{
SetPlayerSpecialAction(playerid, SPECIAL_ACTION_USEJETPACK);
SendClientMessage(playerid,STEALTH_OLIVE,"Jetpack Spawned!");
SendClientMessage(playerid,STEALTH_OLIVE,"Want to give player a jetpack? Use /jetpack [ID]");
}
return 1;
}

