Question
#3

What does mapping have to do with this?

Anyway: You need to use the callback called "OnPlayerConnect". This has a single parameter of (playerid). You can view the wiki page here: https://sampwiki.blast.hk/wiki/OnPlayerConnect
pawn Код:
public OnPlayerConnect(playerid)
{
   
    return 1;
}
You will also need the GivePlayerWeapon function, which has three parameters: (playerid, weaponid, ammo). You can view the wiki page here: https://sampwiki.blast.hk/wiki/GivePlayerWeapon

pawn Код:
GivePlayerWeapon(playerid, weaponid, ammo);
Combining those two will give you:
pawn Код:
public OnPlayerConnect(playerid)
{
     GivePlayerWeapon(playerid, weaponid, ammo);
     return 1; //Always return 1 to allow this callback to continue into filterscripts.
}
You will obviously need to fill out weaponid and ammo yourself, as I don't know what weapon/ammo amount you want. You can get the weaponid from the wiki, and the ammo amount is up to you.
Reply


Messages In This Thread
Question - by areddy2 - 23.12.2011, 19:08
Re: Question - by Universal - 23.12.2011, 19:10
Re: Question - by Ash. - 23.12.2011, 19:13

Forum Jump:


Users browsing this thread: 1 Guest(s)