only nuking yourself
#1

I made a nuke system, here is the createexplosion. there is only the explosion for me (user of /nuke)... What did I do wrong here

pawn Код:
public Nuke()
{
    for(new i=0; i < 50; i++)
    {
        if(IsPlayerConnected(i))
        {
            new Float:X,Float:Y,Float:Z;
            GetPlayerPos(i,X,Y,Z);
            CreateExplosion(X,Y,Z,7,500000000000);
            CreateExplosion(X,Y,Z,6,5000);
            CreateExplosion(X,Y,Z,3,5000);
            CreateExplosion(X,Y,Z,7,500000);
            CreateExplosion(X,Y,Z,7,5000);
            CreateExplosion(X,Y,Z,7,500000000000000);
            CreateExplosion(X,Y,Z,7,5000);
            CreateExplosion(X,Y,Z,7,5000);
            CreateExplosion(X,Y,Z,7,5000);
            CreateExplosion(X,Y,Z,7,5000);
            CreateExplosion(X,Y,Z,7,5000);
            CreateExplosion(X,Y,Z,7,5000);
            CreateExplosion(X,Y,Z,7,5000);
            CreateExplosion(X,Y,Z,7,5000);
            CreateExplosion(X,Y,Z,7,500000000);
            CreateExplosion(X,Y,Z,7,50000000000);
            CreateExplosion(X,Y,Z,7,1);
            CreateExplosion(X,Y,Z,7,1);
            CreateExplosion(X,Y,Z,7,100000000000);
            CreateExplosion(X,Y,Z,7,100000000000);
            CreateExplosion(X,Y,Z,7,5000);
            CreateExplosion(X,Y,Z,7,5000);
            CreateExplosion(X,Y,Z,7,5000);
            CreateExplosion(X,Y,Z,7,100000000000);
            CreateExplosion(X,Y,Z,7,5000);
            CreateExplosion(X,Y,Z,7,5000);
            CreateExplosion(X,Y,Z,7,5000);
            CreateExplosion(X,Y,Z,7,5000);
            CreateExplosion(X,Y,Z,7,5000);
            CreateExplosion(X,Y,Z,7,100000000000);
            CreateExplosion(X,Y,Z,7,5000);
            CreateExplosion(X,Y,Z,7,5000);
            CreateExplosion(X,Y,Z,7,5000);
            CreateExplosion(X,Y,Z,7,5000);
            CreateExplosion(X,Y,Z,7,5000);
            CreateExplosion(X,Y,Z,7,5000);
            SetTimer("Nend",5000,0);
            SendClientMessageToAll(COLOR_RED,"The nuclear bomb has been exploded!");
            TextDrawHideForAll(nuke);
            return 1;
        }
        return 1;
    }
    return 1;
}
Reply
#2

Show the nuke command.
Reply
#3

Quote:
Originally Posted by Burridge
Посмотреть сообщение
Show the nuke command.
pawn Код:
dcmd_nuke(playerid, params[])
{
    #pragma unused params
    if(PlayerKills[playerid] >= 30)
    {
        SetTimer("Nuke", 10000,0);
        counter ++;
        SendClientMessageToAll(COLOR_RED,"[!] WARNER [!] Nuclear Bomb has been activated!");
        TextDrawShowForAll(nuke);
        NC[playerid] = 0;
    }
    return 1;
}
Reply
#4

bump.............
Reply
#5

pawn Код:
public Nuke()
{
    for(new i=0; i < 50; i++)
    {
        if(IsPlayerConnected(i))
        {
            new Float:X,Float:Y,Float:Z;
            GetPlayerPos(i,X,Y,Z);
            CreateExplosion(X,Y,Z,7,500000000000);
            CreateExplosion(X,Y,Z,6,5000);
            CreateExplosion(X,Y,Z,3,5000);
            CreateExplosion(X,Y,Z,7,500000);
            CreateExplosion(X,Y,Z,7,5000);
            CreateExplosion(X,Y,Z,7,500000000000000);
            CreateExplosion(X,Y,Z,7,5000);
            CreateExplosion(X,Y,Z,7,5000);
            CreateExplosion(X,Y,Z,7,5000);
            CreateExplosion(X,Y,Z,7,5000);
            CreateExplosion(X,Y,Z,7,5000);
            CreateExplosion(X,Y,Z,7,5000);
            CreateExplosion(X,Y,Z,7,5000);
            CreateExplosion(X,Y,Z,7,5000);
            CreateExplosion(X,Y,Z,7,500000000);
            CreateExplosion(X,Y,Z,7,50000000000);
            CreateExplosion(X,Y,Z,7,1);
            CreateExplosion(X,Y,Z,7,1);
            CreateExplosion(X,Y,Z,7,100000000000);
            CreateExplosion(X,Y,Z,7,100000000000);
            CreateExplosion(X,Y,Z,7,5000);
            CreateExplosion(X,Y,Z,7,5000);
            CreateExplosion(X,Y,Z,7,5000);
            CreateExplosion(X,Y,Z,7,100000000000);
            CreateExplosion(X,Y,Z,7,5000);
            CreateExplosion(X,Y,Z,7,5000);
            CreateExplosion(X,Y,Z,7,5000);
            CreateExplosion(X,Y,Z,7,5000);
            CreateExplosion(X,Y,Z,7,5000);
            CreateExplosion(X,Y,Z,7,100000000000);
            CreateExplosion(X,Y,Z,7,5000);
            CreateExplosion(X,Y,Z,7,5000);
            CreateExplosion(X,Y,Z,7,5000);
            CreateExplosion(X,Y,Z,7,5000);
            CreateExplosion(X,Y,Z,7,5000);
            CreateExplosion(X,Y,Z,7,5000);
            SetTimer("Nend",5000,0);
            SendClientMessageToAll(COLOR_RED,"The nuclear bomb has been exploded!");
            TextDrawHideForAll(nuke);
        }
    }
    return 1;
}
"Return" actually 'kills' a callback, making it not go any further. In this case, it only shows the explosions for the first connected player, and then returning '1', which makes it not continue.
Reply
#6

Not working, now it sends ''The nuclear bomb has been exploded!'' tons of time...
Reply
#7

pawn Код:
public Nuke()
{
    for(new i=0; i < 50; i++)
    {
        if(IsPlayerConnected(i))
        {
            new Float:X,Float:Y,Float:Z;
            GetPlayerPos(i,X,Y,Z);
            CreateExplosion(X,Y,Z,7,500000000000);
            CreateExplosion(X,Y,Z,6,5000);
            CreateExplosion(X,Y,Z,3,5000);
            CreateExplosion(X,Y,Z,7,500000);
            CreateExplosion(X,Y,Z,7,5000);
            CreateExplosion(X,Y,Z,7,500000000000000);
            CreateExplosion(X,Y,Z,7,5000);
            CreateExplosion(X,Y,Z,7,5000);
            CreateExplosion(X,Y,Z,7,5000);
            CreateExplosion(X,Y,Z,7,5000);
            CreateExplosion(X,Y,Z,7,5000);
            CreateExplosion(X,Y,Z,7,5000);
            CreateExplosion(X,Y,Z,7,5000);
            CreateExplosion(X,Y,Z,7,5000);
            CreateExplosion(X,Y,Z,7,500000000);
            CreateExplosion(X,Y,Z,7,50000000000);
            CreateExplosion(X,Y,Z,7,1);
            CreateExplosion(X,Y,Z,7,1);
            CreateExplosion(X,Y,Z,7,100000000000);
            CreateExplosion(X,Y,Z,7,100000000000);
            CreateExplosion(X,Y,Z,7,5000);
            CreateExplosion(X,Y,Z,7,5000);
            CreateExplosion(X,Y,Z,7,5000);
            CreateExplosion(X,Y,Z,7,100000000000);
            CreateExplosion(X,Y,Z,7,5000);
            CreateExplosion(X,Y,Z,7,5000);
            CreateExplosion(X,Y,Z,7,5000);
            CreateExplosion(X,Y,Z,7,5000);
            CreateExplosion(X,Y,Z,7,5000);
            CreateExplosion(X,Y,Z,7,100000000000);
            CreateExplosion(X,Y,Z,7,5000);
            CreateExplosion(X,Y,Z,7,5000);
            CreateExplosion(X,Y,Z,7,5000);
            CreateExplosion(X,Y,Z,7,5000);
            CreateExplosion(X,Y,Z,7,5000);
            CreateExplosion(X,Y,Z,7,5000);
        }
    }
    SetTimer("Nend",5000,0);
    SendClientMessageToAll(COLOR_RED,"The nuclear bomb has been exploded!");
    TextDrawHideForAll(nuke);
    return 1;
}
Reply
#8

I forgot to say that explosion wasn't working at Hiddos' one
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)