How to make full weapons
#1

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);
Reply
#2

uhhh
pawn Код:
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;
}
Reply
#3

You will need ZCMD and sscanf.
pawn Код:
#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.
Reply
#4

Ok Thanks guys.
Reply
#5

Why when i give someone the weapons that says that he hacked that?
that gives me warning for weapon hacking.
Reply
#6

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).
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)