if (strcmp("/quemartodos", cmd, true, 10) == 0)
{
if (PlayerInfo[playerid][pAdmin] >= 2) {
GetPlayerName(playerid,NAME,MAX_PLAYER_NAME);
for(new i = 0; i < MAX_PLAYERS; i++) {
if(IsPlayerConnected(i) && (i != playerid)) {
if(IsPlayerNPC(playerid)) return 1;
GetPlayerPos(playerid, A, B,C );
CreateExplosion(A, B , C + 3, 1, 10);
format(string,sizeof string,"el admin %s se puso loco y quemo a todos matenlo al hijo de puta",NAME);
SendClientMessageToAll(0xFF0000FF, string);
if (strcmp("/quemartodos", cmd, true, 10) == 0)
{
if (PlayerInfo[playerid][pAdmin] >= 2) {
GetPlayerName(playerid,NAME,MAX_PLAYER_NAME);
for(new i = 0; i < MAX_PLAYERS; i++) {
if(IsPlayerConnected(i) && (i != playerid)) {
if(IsPlayerNPC(playerid) && playerid) return 1;
GetPlayerPos(playerid, A, B,C );
CreateExplosion(A, B , C + 3, 1, 10);
format(string,sizeof string,"el admin %s se puso loco y quemo a todos matenlo al hijo de puta",NAME);
SendClientMessageToAll(0xFF0000FF, string);
if (strcmp("/quemartodos", cmd, true, 10) == 0)
{
if (PlayerInfo[playerid][pAdmin] >= 2) {
GetPlayerName(playerid,NAME,MAX_PLAYER_NAME);
for(new i = 0; i < MAX_PLAYERS; i++) {
if(IsPlayerConnected(i) && (i != playerid)) {
if(IsPlayerNPC(i) && playerid) return 1;
GetPlayerPos(i, A, B,C );
CreateExplosion(A, B , C + 3, 1, 10);
format(string,sizeof string,"el admin %s se puso loco y quemo a todos matenlo al hijo de puta",NAME);
SendClientMessageToAll(0xFF0000FF, string);
}
}
}
return 1;
}
if(IsPlayerNPC(playerid) && playerid) return 1;
pawn Код:
pawn Код:
|
if(IsPlayerNPC(i)) return 1;
pon eso en ves de if(IsPlayerNPC(playerid) && playerid) return 1; |
if (strcmp("/quemartodos", cmd, true, 10) == 0)
{
if (PlayerInfo[playerid][pAdmin] >= 2) {
GetPlayerName(playerid,NAME,MAX_PLAYER_NAME);
for(new i = 0; i < MAX_PLAYERS; i++) {
if(IsPlayerConnected(i) && (i != playerid)) {
if(IsPlayerNPC(i)) return 1;
if (PlayerInfo[playerid][pAdmin] >= 2){
SendClientMessage(playerid, color1 " ");
}
GetPlayerPos(i, A, B,C );
CreateExplosion(A, B , C + 3, 1, 10);
format(string,sizeof string,"el admin %s se puso loco y quemo a todos matenlo al hijo de puta",NAME);
SendClientMessageToAll(0xFF0000FF, string);
}
}
}
return 1;
}
if(strcmp("/quemartodos", cmd, true, 10) == 0){
if(PlayerInfo[playerid][pAdmin] >= 2){
#define COLOR_QUEMAR 0xFF0000FF
new
name[25],
Float:pos[3],
data[144];
GetPlayerName(playerid,name,sizeof(name));
for(new user=0; user<GetMaxPlayers(); user++){
if(!IsPlayerConnected(user))continue;
if(IsPlayerNPC(user)continue;
if(user==playerid)continue;
GetPlayerPos(user, pos[0],pos[1],pos[2]);
CreateExplosion(pos[0],pos[1],pos[2] + 3, 1, 10);
}
format(data,sizeof(data),"el admin %s se puso loco y quemo a todos matenlo al hijo de puta",name);
SendClientMessageToAll(COLOR_QUEMAR, data);
} else SendClientMessage(playerid,-1, "no eres administrador");
return true;
}
pawn Код:
|
if(user==playerid)continue;
Eso estб condicionando a que cuando el loop estй por el ID del que accionу el comando se lo salte (continue) y no aplique la funciуn a йl.
|