GivePlayerWeapon
#1

PHP код:
CMD:lspdset(playeridparams[])
{
    if(
Player[playerid][PlayerFaction] != FACTION_LSPD) return SCM(playerid, -1"Non fai parte di una fazione legale!");
    if(
IsPlayerInRangeOfPoint(playerid51129.0151,-1485.1357,22.7690))
    {
       
Player[playerid][FactionDuty] = 1;
       
GivePlayerWeapon(playerid348100); //Desert Eagle
       
GivePlayerWeapon(playerid356100); // M4
       
GivePlayerWeapon(playerid349100); // Shotgun
       
GivePlayerWeapon(playerid358100); // Sniper
       
GivePlayerWeapon(playerid353100); // Mp5
       
GivePlayerWeapon(playerid3341); //Manganello
    
}
    return 
1;

Hi guys why when i write this cmd in game, that don't give me the weapon...?
Reply
#2

https://sampwiki.blast.hk/wiki/Weapons

Take a look and put the id of weapon not model number

GivePlayerWeapon(playerid, 24, 100); //Desert Eagle , 100 ammo
Reply
#3

I'm retard..... sorry ahah
Reply
#4

Quote:
Originally Posted by Tenka
Посмотреть сообщение
https://sampwiki.blast.hk/wiki/Weapons

Take a look and put the id of weapon not model number

GivePlayerWeapon(playerid, 24, 100); //Desert Eagle , 100 ammo
Even better:

Use the defines that already exist, for example WEAPON_DESERT_EAGLE.
Then you never need to look up IDs or make comments to remember which weapon you've placed there!
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)