23.12.2011, 19:13
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
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
Combining those two will give you:
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.
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;
}
pawn Код:
GivePlayerWeapon(playerid, weaponid, ammo);
pawn Код:
public OnPlayerConnect(playerid)
{
GivePlayerWeapon(playerid, weaponid, ammo);
return 1; //Always return 1 to allow this callback to continue into filterscripts.
}