31.08.2014, 20:52
Try this:
It is from my script but.. Maybe it work!
Quote:
CMD:fakecmd(playerid,params[]) { if(PlayerInfo[playerid][Level] >= 5) { new tmp[128], tmp2[128], Index; tmp = strtok(params,Index), tmp2 = strtok(params,Index); if(isnull(tmp) || isnull(tmp2)) return SendClientMessage(playerid, red, "USAGE: /fakecmd [playerid] [command]"); new player1 = strval(tmp); if(PlayerInfo[player1][Level] == ServerInfo[MaxAdminLevel] && PlayerInfo[playerid][Level] != ServerInfo[MaxAdminLevel]) return SendClientMessage(playerid,red,"ERROR: You cannot use this command on this admin"); if(IsPlayerConnected(player1) && player1 != INVALID_PLAYER_ID) { CallRemoteFunction("OnPlayerCommandPerformed", "is", player1, tmp2); return SendClientMessage(playerid,blue,"Fake command sent"); } else return SendClientMessage(playerid,red,"ERROR: Player is not connected"); } else return SendClientMessage(playerid,red,"ERROR: You are not a high enough level to use this command"); } #endif |
