09.02.2014, 00:56
Hey guys, i will send my code, when am using /jetpack it says Invalid player specified but it's correct id i was id 0. So here is my code. So what's wrong with this, i can see in the code that everything is going well, but maybe i have a mistake, can you help me please. Thanks.
Код:
} CMD:jetpack(playerid, params[]) { if(PlayerInfo[playerid][pAdmin] >= 2 && PlayerInfo[playerid][pAdmin] < 4) { JetPack[playerid] = 1; SetPlayerSpecialAction(playerid, SPECIAL_ACTION_USEJETPACK); return 1; } new string[128], plo; if(sscanf(params, "u", plo)) { SendClientMessageEx(playerid, COLOR_GRAD2, "USAGE: /jetpack [playerid]"); return 1; } if (IsPlayerConnected(plo)) { if(plo != INVALID_PLAYER_ID) { if (PlayerInfo[playerid][pAdmin] >= 4) { SendClientMessageEx(plo, COLOR_GRAD1, "Jetpack Given!"); JetPack[plo] = 1; SetPlayerSpecialAction(plo, SPECIAL_ACTION_USEJETPACK); format(string, sizeof(string), "[TDM]: %s has received a jetpack from %s", GetPlayerNameEx(plo), GetPlayerNameEx(playerid)); SendClientMessageToAllEx(COLOR_LIGHTRED, string); } else { SendClientMessageEx(playerid, COLOR_GRAD1, "You are not authorized to use that command!"); } } } else SendClientMessageEx(playerid, COLOR_GRAD1, "Invalid player specified."); return 1; }