/buywepset CMD HELP -
NinjaChicken - 27.07.2012
ok im trying to make a cmd like /buywepset and it gives the player, a spas12,deagle,sniper,mp5,bat,m4 and charges them say 500k but i want it like they type it, it says Warning: this is alot dearer then buying them from a arms dealer type the cmd again to continue please someone help
Re: /buywepset CMD HELP -
Devilxz97 - 27.07.2012
how much ammo ?
Re: /buywepset CMD HELP -
NinjaChicken - 27.07.2012
unlimited
Re: /buywepset CMD HELP -
Devilxz97 - 27.07.2012
okay
Re: /buywepset CMD HELP -
NinjaChicken - 27.07.2012
please help me?
Re: /buywepset CMD HELP -
Devilxz97 - 27.07.2012
pawn Код:
CMD:buywepset(playerid, params[])
{
if(GetPlayerMoney(playerid) < 500000)
return SendClientMessage(playerid, red, "[ERROR]:You dont have enough money to buy this weapon set!");
GivePlayerWeapon(playerid, 27, 999999);
GivePlayerWeapon(playerid, 24, 999999);
GivePlayerWeapon(playerid, 34, 999999);
GivePlayerWeapon(playerid, 29, 999999);
GivePlayerWeapon(playerid, 5, 1);
GivePlayerWeapon(playerid, 31, 999999);
SendClientMessage(playerid, green, "[SYSTEM]:You have Purchase Weapon Set for $500k");
return 1;
}
i dont understand much :\
this is the first step then what u want ??
Re: /buywepset CMD HELP -
NinjaChicken - 27.07.2012
have them type it then it will give them a warning, then to buy the weapons they have to type it again
Re: /buywepset CMD HELP -
Devilxz97 - 27.07.2012
this will be awesome if u do this on Dialog it's will be great and simple
Re: /buywepset CMD HELP -
NinjaChicken - 27.07.2012
i dont want dialogs though lol,
Re: /buywepset CMD HELP -
Ranama - 27.07.2012
You'll have to make a variable for every player, with will look if that player is offered a weapon set, like this:
Код:
new OfferedWeaponSet[MAX_PLAYERS];//make this at the top of the script
//and on the command you make
if(OfferedWeaponSet[playerid] == 0){
SendClientMessage(playerid, COLOR_RED, "Do you really wanna buy a weapon set?");
OfferedWeaponSet[playerid] = 1;
return 1;
}
else{
//your old code to buy a weapon here
}
Hope i helped