Posts: 271
Threads: 69
Joined: Aug 2010
Reputation:
0
public OnPlayerSpawn(playerid)
{
SetPlayerSkillLevel(playerid, WEAPONSKILL_SAWNOFF_SHOTGUN, 1);
//This will make them use single-handed sawnoff shotguns.
return 1;
}
Doesn't that just make a player to spawn with a sawnoff shotgun?
Posts: 382
Threads: 1
Joined: Nov 2007
Reputation:
0
No, it sets the skill level of the sawnoff shotgun to 1. Meaning they can only hold 1 shotgun. Use GivePlayerWeapon to give someone a weapon.
Posts: 271
Threads: 69
Joined: Aug 2010
Reputation:
0
Ohh cool. So i have to do SetPlayerSkillLevel(playerid, WEAPONSKILL_SAWNOFF_SHOTGUN, 1); For every gun?
Posts: 4,878
Threads: 85
Joined: Jun 2007
Reputation:
0
In short, you can rewrite a GivePlayerWeaponEx function. Check if the player already has the weapon you want to give him with GetPlayerWeaponData. If he has, give him the weapon normally, else reset his weapons and then give him the weapon.
That wont work for pickups, but you could use custom pickups for that then.