[Ayuda]Con algo...
#1

Weno miren tngo el Ladmin para un server no? tonces lo re modifique x mi todo barbaro. Pero en algunos casos, cuando uso los comandos: /kick /warn /ban /rban etc, etc quiero q diga la ID del jugador (q seria "playerid")..
En este caso yo la tngo asi:

Код:
dcmd_warn(playerid,params[]) {
    if(PlayerInfo[playerid][Level] >= 2) {
	    new tmp[256], tmp2[256], Index;		tmp = strtok(params,Index), tmp2 = strtok(params,Index);
	    if(!strlen(tmp) || !strlen(tmp2)) return SendClientMessage(playerid, red, "Escribe: /warn [playerid] [Razon]");
    	new warned = strval(tmp), str[128];
		if(PlayerInfo[warned][Level] == ServerInfo[MaxAdminLevel] && PlayerInfo[playerid][Level] != ServerInfo[MaxAdminLevel]) return SendClientMessage(playerid,red,"ERROR: You cannot use this command on this admin");
	 	if(IsPlayerConnected(warned) && warned != INVALID_PLAYER_ID) {
 	    	if(warned != playerid) {
			    CMDMessageToAdmins(playerid,"WARN");
				PlayerInfo[warned][Warnings]++;
				if( PlayerInfo[warned][Warnings] == MAX_WARNINGS) {
					format(str, sizeof (str), "*** %s (id:%d) fue expulsado por sobrepasar los 3 warnings. (Warning: %d/%d)***", pName(warned), playerid,  params[1+strlen(tmp)], PlayerInfo[warned][Warnings], MAX_WARNINGS);
					SendClientMessageToAll(grey, str);
					SaveToFile("KickLog",str);	Kick(warned);
					return PlayerInfo[warned][Warnings] = 0;
				} else {
					format(str, sizeof (str), "*** %s (id:%d) fue advertido por un admin.  (Razon: %s) (Warning: %d/%d)***", pName(warned), playerid, params[1+strlen(tmp)], PlayerInfo[warned][Warnings], MAX_WARNINGS);
					return SendClientMessageToAll(yellow, str);
				}
			} else return SendClientMessage(playerid, red, "No puedes darte una warn a vos mismo!");
		} else return SendClientMessage(playerid, red, "Jugador no conectado!");
	} else return SendClientMessage(playerid,red,"No estas autorizado para usar este comando!");
}
X ejemplo, cuando doy un Warn me dice la ID pero con un amigo lo probamos i el era el ID 1 i yo el 0 pero decia q la ID d el era el 0 :S
Quisiera saber como hago para q salga la verdada ID..
PD: lo mismo me pasa para Kick, Ban, etc..
Gracias
Reply


Messages In This Thread
[Ayuda]Con algo... - by TiNcH010 - 09.08.2010, 19:26
Respuesta: [Ayuda]Con algo... - by Cesar_Biker - 09.08.2010, 19:30
Re: [Ayuda]Con algo... - by TiNcH010 - 09.08.2010, 19:36
Re: [Ayuda]Con algo... - by TiNcH010 - 09.08.2010, 19:42
Re: [Ayuda]Con algo... - by MedinaRockz - 09.08.2010, 19:42
Respuesta: [Ayuda]Con algo... - by Adoniiz - 09.08.2010, 19:42
Re: [Ayuda]Con algo... - by TiNcH010 - 09.08.2010, 19:46
Respuesta: [Ayuda]Con algo... - by Adoniiz - 09.08.2010, 19:47
Re: [Ayuda]Con algo... - by TiNcH010 - 09.08.2010, 20:07
Respuesta: [Ayuda]Con algo... - by Cesar_Biker - 09.08.2010, 20:07

Forum Jump:


Users browsing this thread: 2 Guest(s)