AddPlayerClass question
#1

How can I add more then 3 weapons on AddPlayerClass?
Reply
#2

can someone help me I've been waiting for like hours
Reply
#3

Read the wiki. It can't be that hard. https://sampwiki.blast.hk/wiki/AddPlayerClass
Reply
#4

I've read it but there are only 3 slots for weapons
Reply
#5

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
Reply
#6

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
Reply
#7

GivePlayerWeapon?
Reply
#8

as expected it didn't work I've copied and pasted your code in OnPlayerSpawn but it gave me a bunch of errors
Reply
#9

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
Reply
#10

Try adding "GivePlayerWeapon" on " OnPlayerSpawn" .
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)