SA-MP Forums Archive
Help please. - 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)
+--- Thread: Help please. (/showthread.php?tid=382094)



Help please. - cluckintucker - 02.10.2012

Hello, I've made a script to load a crate onto a forklift. I've already made a command to set the crate on the ground, and once its set on the ground, I wanted to make a command "/getweapon" from that crate thats set on the ground. Ill show you a image for more details. It doesnt have to be four weaponss but i was hoping you can make it like that. Anyways I'm hoping if anyone can make a command like that for the crate. Thanks.


Re: Help please. - trapstar2020 - 02.10.2012

pawn Код:
//at the top of script
new crate;

//under gamemodeint
crate = createobject();/createdynamicobject();


CMD:getweapon(playerid,params)
{
 if(IsPlayerInRangeOfPoint(playerid, 7.0, X, Y, Z)) // xyz of the object
 {
  GivePlayerWeapon(playerid,weaponid,ammo); //https://sampwiki.blast.hk/wiki/Weapons / Do as many times u want
 }
 return 1;
}



Re: Help please. - cluckintucker - 02.10.2012

Quote:
Originally Posted by trapstar2020
Посмотреть сообщение
pawn Код:
//at the top of script
new crate;

//under gamemodeint
crate = createobject();/createdynamicobject();


CMD:getweapon(playerid,params)
{
 if(IsPlayerInRangeOfPoint(playerid, 7.0, X, Y, Z)) // xyz of the object
 {
  GivePlayerWeapon(playerid,weaponid,ammo); //https://sampwiki.blast.hk/wiki/Weapons / Do as many times u want
 }
 return 1;
}
i got 2 errors