Quote:
Originally Posted by UFF
Random Weapons on Spawn
pawn Code:
new RandomWeapons[MAX_PLAYERS]; public OnPlayerConnect(playerid) { RandomWeapons[playerid] = 0; return 1; }
public OnPlayerSpawn(playerid) { GivePlayerSpawnWeapons(playerid); return 1; }
stock GivePlayerSpawnWeapons(playerid) { switch(RandomWeapons[playerid]) { case 0: { // Random Weapons 1 RandomWeapons[playerid]++; // Increases the RandomWeapon value to 1, } case 1: { // Random Weapons 2 RandomWeapons[playerid] = 0; // Reset to Value 0 , so it will give Random Weapon 1 weapons again when player spawns. } } }
|
The fuck? Firstly there is no absolute "GivePlayerWeapon" native in your code, from where do you want to get the weapon? Then, weapons IDs are limited between 1 and 46, and thirdly I don't understand a shit in your switch statement, sorry :/