How to make a player spawn with a gun?
#1

pawn Код:
public OnGameModeInit()
{
    SetGameModeText("Austin's Test Script");
    ShowPlayerMarkers(1);
    ShowNameTags(1);
    AllowAdminTeleport(1);
    //Player Classes
        AddPlayerClass(0,1544.7,-1675.6057,13.5589,89.8978,0,0,0,0,0,0); // LSPD 294 Spawn
    AddPlayerClass(102,1544.7137,-1675.6057,13.5589,89.8978,0,0,0,0,0,0); // LSPD 165 Spawn
    AddPlayerClass(103,1544.7137,-1675.6057,13.5589,89.8978,0,0,0,0,0,0); // LSPD 165 Spawn}
    AddPlayerClass(104,1544.7137,-1675.6057,13.5589,89.8978,0,0,0,0,0,0); // LSPD 165 Spawn
    AddPlayerClass(105,1544.7137,-1675.6057,13.5589,89.8978,0,0,0,0,0,0); // LSPD 165 Spawn
    AddPlayerClass(106,1544.7137,-1675.6057,13.5589,89.8978,0,0,0,0,0,0); // LSPD 165 Spawn
    AddPlayerClass(108,1544.7137,-1675.6057,13.5589,89.8978,0,0,0,0,0,0); // LSPD 165 Spawn
    AddPlayerClass(109,1544.7137,-1675.6057,13.5589,89.8978,0,0,0,0,0,0); // LSPD 165 Spawn
    AddPlayerClass(110,1544.7137,-1675.6057,13.5589,89.8978,0,0,0,0,0,0); // LSPD 165 Spawn
    AddPlayerClass(111,1544.7137,-1675.6057,13.5589,89.8978,0,0,0,0,0,0); // LSPD 165 Spawn
    AddPlayerClass(112,1544.7137,-1675.6057,13.5589,89.8978,0,0,0,0,0,0); // LSPD 165 Spawn
    AddPlayerClass(113,1544.7137,-1675.6057,13.5589,89.8978,0,0,0,0,0,0); // LSPD 165 Spawn
    AddPlayerClass(114,1544.7137,-1675.6057,13.5589,89.8978,0,0,0,0,0,0); // LSPD 165 Spawn
    AddPlayerClass(115,1544.7137,-1675.6057,13.5589,89.8978,0,0,0,0,0,0); // LSPD 165 Spawn
    AddPlayerClass(116,1544.7137,-1675.6057,13.5589,89.8978,0,0,0,0,0,0); // LSPD 165 Spawn
}
So this is my player classes, after a player picks his skin and spawns, how do I make him spawn with some guns?
I would like each class to spawn with a differnent gun
Reply
#2

Go to this page: https://sampwiki.blast.hk/wiki/AddPlayerClass
the last 6 parameters of AddPlayerClass are weapon id and amount of ammo.
Reply
#3

pawn Код:
AddPlayerClass(0,1544.7,-1675.6057,13.5589,89.8978,0,0,0,0,0,0);
AddPlayerClass(skin, Float:x, Float:y, Float:z, Float:angle, weapon1, weapon1_ammo, weapon2, weapon2_ammo, weapon3, weapon3_ammo);
understands huh ?
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)