GivePlayerWeapon - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (
https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: GivePlayerWeapon (
/showthread.php?tid=172499)
GivePlayerWeapon -
mrcoolballs - 30.08.2010
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
Re: GivePlayerWeapon -
Sascha - 30.08.2010
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
Re: GivePlayerWeapon -
mrcoolballs - 30.08.2010
wow thanks alot