CMD:kick(playerid,params[]) { if (PlayerInfo[playerid][pAdmin] >= 1) { new id,n[MAX_PLAYER_NAME],reason[128], on[MAX_PLAYER_NAME], string[256], string2[256]; if(sscanf(params,"uz",id, reason)) return SendClientMessage(playerid,red,"Usa:/kick [JugadorID] [reason]"); else if(playerid == INVALID_PLAYER_ID) SendClientMessage(playerid,red,"System: Invalid ID"); if (id == INVALID_PLAYER_ID) return SendClientMessage(playerid, red, "System: Invalid ID"); if(playerid == id) return SendClientMessage(playerid,red, "Tu no puedes kickearte tu mismo."); else { GetPlayerName(playerid,n,sizeof(n)); GetPlayerName(id,on,sizeof(on)); new Aсo, Mes, Dia, Hora, Minutos, Segundos; getdate(Aсo, Mes, Dia); gettime(Hora, Minuose, Segundos); format(string,sizeof(string),"Tu has sido expulsado por un admin %s por: %s - %02d/%02d/%d - %02d:%02d:%02d",n,razon,Dia,Mes,Aсo,Hora,Minuto,Segundos); SendClientMessage(id,red,string); format(string2, sizeof(string), "Admin %s (%d) ha kickeado %s (%d) - Razon: %s - %02d/%02d/%d - %02d:%02d:%02d",n,playerid,on,id,razon,Dia,Mes,Aсo,Hora,Minutos,Segundos); SendClientMessageToAll(red,string2); KickLog(string2); Kick(id); return true; } } else return 0; }
[17:12:54] sscanf error: System not initialised.
[17:11:58] Loading plugin: sscanf [17:11:58] [17:11:58] =============================== [17:11:58] sscanf plugin loaded. [17:11:58] Version: 2.8.1 [17:11:58] © 2012 Alex "******" Cole [17:11:58] ===============================
[17:23:07] =============================== [17:23:07] sscanf plugin loaded. [17:23:07] © 2009 Alex "******" Cole [17:23:07] 0.3d-R2 500 Players "dnee" [17:23:07] ===============================
if(sscanf(params,"ds[180]",id, reason)) return SendClientMessage(playerid,red,"Usa:/kick [JugadorID] [reason]");
[17:12:54] sscanf error: System not initialised. |
CMD:kick(playerid,params[]) { if (PlayerInfo[playerid][pAdmin] >= 1) { new id,n[MAX_PLAYER_NAME],reason[128], on[MAX_PLAYER_NAME], string[128], string2[128]; if(sscanf(params,"us[128]",id, reason)) return SendClientMessage(playerid,red,"Usa:/kick [JugadorID] [reason]"); if(playerid == INVALID_PLAYER_ID) SendClientMessage(playerid,red,"System: Invalid ID"); if(id == INVALID_PLAYER_ID) return SendClientMessage(playerid, red, "System: Invalid ID"); if(playerid == id) return SendClientMessage(playerid,red, "Tu no puedes kickearte tu mismo."); GetPlayerName(playerid,n,sizeof(n)); GetPlayerName(id,on,sizeof(on)); new Aсo, Mes, Dia, Hora, Minutos, Segundos; getdate(Aсo, Mes, Dia); gettime(Hora, Minuose, Segundos); format(string,sizeof(string),"Tu has sido expulsado por un admin %s por: %s - %02d/%02d/%d - %02d:%02d:%02d",n,razon,Dia,Mes,Aсo,Hora,Minuto,Segundos); SendClientMessage(id,red,string); format(string2, sizeof(string), "Admin %s (%d) ha kickeado %s (%d) - Razon: %s - %02d/%02d/%d - %02d:%02d:%02d",n,playerid,on,id,razon,Dia,Mes,Aсo,Hora,Minutos,Segundos); SendClientMessageToAll(red,string2); KickLog(string2); Kick(id); } return 1; }
#include <sscanf>