[HELP] weapons
#4

Quote:
Originally Posted by UFF
View Post
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 :/
Reply


Messages In This Thread
[HELP] weapons - by zakariacaspeer - 01.11.2018, 15:43
Re: [HELP] weapons - by TheToretto - 01.11.2018, 15:57
Re: [HELP] weapons - by UFF - 01.11.2018, 16:12
Re: [HELP] weapons - by TheToretto - 01.11.2018, 16:28
Re: [HELP] weapons - by UFF - 01.11.2018, 16:40
Re: [HELP] weapons - by TheToretto - 01.11.2018, 16:53
Re: [HELP] weapons - by zakariacaspeer - 01.11.2018, 17:15
Re: [HELP] weapons - by zakariacaspeer - 01.11.2018, 17:20
Re: [HELP] weapons - by TheToretto - 01.11.2018, 17:33
Re: [HELP] weapons - by zakariacaspeer - 01.11.2018, 18:06
Re: [HELP] weapons - by d3Pedro - 01.11.2018, 18:10
Re: [HELP] weapons - by zakariacaspeer - 01.11.2018, 18:12
Re: [HELP] weapons - by TheToretto - 01.11.2018, 18:46
Re: [HELP] weapons - by zakariacaspeer - 01.11.2018, 18:59
Re: [HELP] weapons - by zakariacaspeer - 01.11.2018, 19:05

Forum Jump:


Users browsing this thread: 1 Guest(s)