AddPlayerClass question - 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: AddPlayerClass question (
/showthread.php?tid=596279)
AddPlayerClass question -
Markhoss - 15.12.2015
How can I add more then 3 weapons on AddPlayerClass?
Re: AddPlayerClass question -
Markhoss - 15.12.2015
can someone help me I've been waiting for like hours
Re: AddPlayerClass question -
CrazyChoco - 15.12.2015
Read the wiki. It can't be that hard.
https://sampwiki.blast.hk/wiki/AddPlayerClass
Re: AddPlayerClass question -
Markhoss - 15.12.2015
I've read it but there are only 3 slots for weapons
Re: AddPlayerClass question -
TwinkiDaBoss - 15.12.2015
PHP код:
stock GiveWeaponBySkin(playerid) {
switch(GetPlayerSkin(playerid)) {
case 0: { //if skin ID 0
GivePlayerWeapon(playerid,24,100);
SendClientMessage(playerid,COLOR_RED,"You are skin ID: 0 and you got a deagle!");
}
case 1: { //if skin ID 1
GivePlayerWeapon(playerid,31,100);
SendClientMessage(playerid,COLOR_RED,"You are skin ID: 1 and you got a M4!");
}
//etc. etc. etc.
}
return true;
}
And then OnPlayerSpawn you can add GiveWeaponBySkin.
From what I know there isnt a default function to set more than 3 weapons
Re: AddPlayerClass question -
Markhoss - 15.12.2015
Thanks TwinkiDaBoss about a year ago I remember I've somehow managed to add more then 3 weapons and it wasnt so tricky but thanks anyway I'll try this
Re: AddPlayerClass question -
CrazyChoco - 15.12.2015
GivePlayerWeapon?
Re: AddPlayerClass question -
Markhoss - 15.12.2015
as expected it didn't work I've copied and pasted your code in OnPlayerSpawn but it gave me a bunch of errors
Re: AddPlayerClass question -
Markhoss - 15.12.2015
Quote:
Originally Posted by CrazyChoco
GivePlayerWeapon?
|
CrazyChoco thanks I've forgotten how to do this because I didn't use pawn for about a year
Re: AddPlayerClass question -
Compiler - 22.12.2015
Try adding "GivePlayerWeapon" on " OnPlayerSpawn" .