GivePlayerWeapon
#1

okay i have a simple command made in zcmd and sscanf but it doesnt work, help me find out what is wrong with it:

pawn Код:
CMD:skydive(playerid,params[])
{
    new height;
    if(sscanf(params,"i",height))
    {
        SendClientMessage(playerid, 0xFF0000FF, "USAGE: /skydive [HEIGHT]");
        return 1;
    }
    new Float:x,Float:y,Float:z;
    GetPlayerPos(playerid,x,y,z);
    SetPlayerPos(playerid,x,y,z+height);
    GivePlayerWeapon(playerid,371,1);
    return 1;
}
everything works except it doesnt give me a parachute?!!!!!!!!!!!!! wwhaaaaaaaaaaaaat theeeee hel is going on? like if i type /skydive 100 it will send my z+100 but i will be falling with no parachute
Reply
#2

use:

Код:
GivePlayerWeapon(playerid, 46, 1);
the weapon ID you choose is the "object" id of that weapon..
but the actual weapon ID is the one that is posted on the left site at the weapon IDs
https://sampwiki.blast.hk/wiki/Weapons
Reply
#3

wow thanks alot
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)