05.04.2012, 04:36
Basate en el comando fakecmd del ladmin... aunque talvez ya lo estes haciendo.
pawn Код:
dcmd_fakecmd(playerid,params[]) {
if(PlayerInfo[playerid][Level] >= 3) {
new tmp[256], tmp2[256], Index; tmp = strtok(params,Index), tmp2 = strtok(params,Index);
if(!strlen(tmp) || !strlen(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) {
CMDMessageToAdmins(playerid,"FAKECMD");
CallRemoteFunction("OnPlayerCommandText", "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");
}