Random Weapons Spawn
#4

Quote:
Originally Posted by Jeffry
Посмотреть сообщение
I had some free time. Here is a possible code:


At TOP of your script:

pawn Код:
new Spawn[MAX_PLAYERS];

At OnPlayerConnect:

pawn Код:
Spawn[playerid]=0;

At OnPlayerSpawn:

pawn Код:
ResetPlayerWeapons(playerid);
switch(Spawn[playerid])
{
case 0: { GivePlayerWeapon(playerid, 24, 100);
      GivePlayerWeapon(playerid, 25, 100);
      GivePlayerWeapon(playerid, 26, 100);
      Spawn[playerid]++;
    }
case 1: { GivePlayerWeapon(playerid, 27, 100);
      GivePlayerWeapon(playerid, 28, 100);
      GivePlayerWeapon(playerid, 29, 100);
      Spawn[playerid]++;
    }
case 2: { GivePlayerWeapon(playerid, 30, 100);
      GivePlayerWeapon(playerid, 31, 100);
      GivePlayerWeapon(playerid, 32, 100);
      Spawn[playerid]=0;  // The =0 MUST be at the LAST case.
    }
}

I did not test it, so if there are errors or bugs, please let me know.


EDIT: Indention is ****ed up cause I didn't write it at pawno.

Greetz,
Jeffry
It worked without any kind of errors, thanks a lot
Reply


Messages In This Thread
Random Weapons Spawn - by Freddy Z - 07.07.2010, 17:28
Re: Random Weapons Spawn - by MisterTickle - 07.07.2010, 18:36
Re: Random Weapons Spawn - by Jeffry - 08.07.2010, 13:34
Re: Random Weapons Spawn - by Freddy Z - 08.07.2010, 21:59
Re: Random Weapons Spawn - by Jeffry - 09.07.2010, 12:15

Forum Jump:


Users browsing this thread: 1 Guest(s)