/buywepset CMD HELP
#1

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

how much ammo ?
Reply
#3

unlimited
Reply
#4

okay
Reply
#5

please help me?
Reply
#6

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 ??
Reply
#7

have them type it then it will give them a warning, then to buy the weapons they have to type it again
Reply
#8

this will be awesome if u do this on Dialog it's will be great and simple
Reply
#9

i dont want dialogs though lol,
Reply
#10

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
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)