SA-MP Forums Archive
Need Help Please :> - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Need Help Please :> (/showthread.php?tid=316532)



Need Help Please :> - HerronInd - 07.02.2012

hi all :>

i want know that how can i re-spwan all players when i use /spwanall cmd.

i mean pls help me to make this command


Re: Need Help Please :> - Nonameman - 07.02.2012

I hope this is what you want.

pawn Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
    if (strcmp("/spawnall", cmdtext, true, 10) == 0)
    {
        for (new i = 0; i < GetMaxPlayers(); i++)
        {
            if (IsPlayerConnected(i)) SpawnPlayer(i);
        }
        return 1;
    }
    return 0;
}



Re: Need Help Please :> - RockStar™ - 07.02.2012

Nonameman Please help Me In THis Thread

https://sampforum.blast.hk/showthread.php?tid=316536


Re: Need Help Please :> - HerronInd - 07.02.2012

Thanks Nonameman and RockStar™


Re: Need Help Please :> - Soap_MacTavish - 07.02.2012

Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
    if(!strcmp(cmdtext, "/spawnall", true))
    {
        for (new i = 0; i < MAX_PLAYERS; i++)
        {
            if (IsPlayerConnected(i)) SpawnPlayer(i);
        }
        return 1;
    }
    return 0;
}



Re: Need Help Please :> - Nonameman - 07.02.2012

I'm glad to help you.