PDA

View Full Version : How to make full weapons


BarFix
25/09/2013, 01:57 PM
How to make full weapons set?
Like "/fullguns [id]" and that give to the player weapons id:
24
27
29
31
34
CMD:fullguns(playerid, params[])
i cant make it,that does not give me.
GivePlayerValidWeapon(playerid, 24, 60000);

park4bmx
25/09/2013, 02:06 PM
uhhh

CMD:fullguns(playerid, params[])
{
new targetid;if(sscanf(params,"u",targetid)) return SendClientMessage(playerid, -1, "Usage: /Givegun [playerid]");
GivePlayerWeapon(targetid, 24, 800);
GivePlayerWeapon(targetid, 27, 800);
GivePlayerWeapon(targetid, 29, 800);
GivePlayerWeapon(targetid, 31, 800);
GivePlayerWeapon(targetid, 34, 800);
return 1;
}

iZN
25/09/2013, 02:06 PM
You will need ZCMD and sscanf.

#define AMMO 50 // Set your ammo for every weapon

CMD:fullguns(playerid, params[])
{
new giveplayerid;
if(sscanf(params, "u", giveplayerid)) return SendClientMessage(playerid, -1 ,"/fullguns (player name/id)");
GivePlayerWeapon(giveplayerid, 24, AMMO);
GivePlayerWeapon(giveplayerid, 27, AMMO);
GivePlayerWeapon(giveplayerid, 29, AMMO);
GivePlayerWeapon(giveplayerid, 31, AMMO);
GivePlayerWeapon(giveplayerid, 34, AMMO);
return true;
}


EDIT: 1-2 second late.

BarFix
25/09/2013, 02:11 PM
Ok Thanks guys. :)

BarFix
25/09/2013, 03:43 PM
Why when i give someone the weapons that says that he hacked that?
that gives me warning for weapon hacking.

Konstantinos
25/09/2013, 03:46 PM
If you use an anticheat and server-side weapons, you need to replace GivePlayerWeapon with the custom function that gives a weapon to the player (registered to the script).