SA-MP Forums Archive
[Tutorial] How to make a Simple Weapon Command with Ammo - 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: Tutorials (https://sampforum.blast.hk/forumdisplay.php?fid=70)
+---- Thread: [Tutorial] How to make a Simple Weapon Command with Ammo (/showthread.php?tid=523210)



How to make a Simple Weapon Command with Ammo - kirostar - 01.07.2014

Hey,
This Tutorial shows you how to make a command to give a player weapon with ammo you want automaticly when they write the command.

1-

The Parameters are :

Код:
(playerid, weaponid, ammo)
(playerid) : The id of the player to give the weapon to him
(weaponid) : write the weapon id (not the name of the weapon)
(ammo) : write the ammo of the weapon

Example :

Код:
GivePlayerWeapon(playerid, 43, 99999); // Gives you camera with ammo of 99999
Now, Lets make the command :

Код:
CMD:camera(playerid, params[])
{
    GivePlayerWeapon(playerid, 43, 99999);
    return 1;
}
That's all.
Hope it worked for you.
Thanks.


Re: How to make a Simple Weapon Command with Ammo - Faix - 02.07.2014

You call this a tutorial?


Re: How to make a Simple Weapon Command with Ammo - PrivatioBoni - 02.07.2014

tl;dr

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

This is pretty pathetic but it's a nice thing you're trying to do. Also, you need to explain you need ZCMD or face people wondering about errors.

This is the worst tutorial I've seen in a long time but I'm sure you'll improve.


Re: How to make a Simple Weapon Command with Ammo - SHE790 - 02.07.2014

Lol this is not a tutorial


Re: How to make a Simple Weapon Command with Ammo - Brezon - 02.07.2014

So this is a tutorial?


Re: How to make a Simple Weapon Command with Ammo - kirostar - 03.07.2014

I'm a new scripter, anyway thank you.