GivePlayerWeapon
#1

PHP код:
CMD:lspdset(playerid, params[])
{
    if(
Player[playerid][PlayerFaction] != FACTION_LSPD) return SCM(playerid, -1, "Non fai parte di una fazione legale!");
    if(
IsPlayerInRangeOfPoint(playerid, 5, 1129.0151,-1485.1357,22.7690))
    {
       
Player[playerid][FactionDuty] = 1;
       
GivePlayerWeapon(playerid, 348, 100); //Desert Eagle
       
GivePlayerWeapon(playerid, 356, 100); // M4
       
GivePlayerWeapon(playerid, 349, 100); // Shotgun
       
GivePlayerWeapon(playerid, 358, 100); // Sniper
       
GivePlayerWeapon(playerid, 353, 100); // Mp5
       
GivePlayerWeapon(playerid, 334, 1); //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)