SA-MP Forums Archive
Scripting Help for New server, moved to scripting disscussion - 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)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Scripting Help for New server, moved to scripting disscussion (/showthread.php?tid=80208)



Scripting Help for New server, moved to scripting disscussion - Guardian - 02.06.2009

I just created a new server and its the default game mode, lvdm 1. However when I choose a character its always a desert eagle as a weapon, I want to add and change some weapons. Please Help. And do I have to change the weapons for character one by one? Please tell me step by step for the scripting, I'm New to scripting.



Re: Scripting Help for New server, moved to scripting disscussion - *ToM* - 03.06.2009

in lvdm there's OnGameModeInit function

sample of the non edited LVDM
pawn Code:
public OnGameModeInit()
{
    SetGameModeText("Ventura's DM~MG");

    ShowPlayerMarkers(1);
    ShowNameTags(1);
   
    // 0.2.2 specific stuff
    //DisableInteriorEnterExits();
    //SetNameTagDrawDistance(10.0);
    //EnableStuntBonusForAll(0);
   
    /* Was testing the new pickup limit.
    new Float:pickX=2040.0520;
    new Float:pickY=1319.2799;
    new Float:pickZ=10.3779;
    new x=0;
    while(x!=400) {
        AddStaticPickup(1272,2,pickX,pickY,pickZ);
        pickY+=1.0;
        x++;
    }*/


    // Player Class's
    AddPlayerClass(265,1958.3783,1343.1572,15.3746,270.1425,0,0,24,300,-1,-1);
 
265- Skin ID
265,1958.3783,1343.1572,15.3746,270.1425,0,0,24,300 -spawn coords
24- is a weapon id ( eagle )
300- is the ammount of ammo on the spawn
Just change the weapon id to whatever you want




Re: Scripting Help for New server, moved to scripting disscussion - miokie - 03.06.2009

You can find weapon Ids on the Wiki

Wiki.sa-mp.com

And script resources

In LVDM the last 6 things which are 0,0,24,500,-1,-1
The first one is the weapon and second the ammo
So if you wanted to keep the desert eagle but add for example a M4
It would look like

31,500,24,500,-1,-1

You can change the -1's to weapon and ammo aswell.

So

M4, Deagle and SMG would look like

31,500,24,500,29,500