Jump to content

Recommended Posts

Posted

Salutare, ma poate ajuta si pe mine cineva cu un tutorial pentru comanda "/buygun" folosind ZCMD??Vreau macar un model cu o singura arma inclusa pe celelalte le pun eu, eu vreau doar asa in principiu ce trebuie facut deoarece vreau sa pun doar anumite arme. Va multumesc anticipat!!

Posted
stock GetGunName(name) {
  	new id;
    switch(name) {
      case "Brass Knuckles": id = 1;
      case "Golf Club": id = 2;
      case "Nightstick": id = 3;
      case "Knife": id = 5;
      case "Baseball Bat": id = 6;
      case "Shovel": id = 7;
      case "AK47": id = 30;
    }
	return id;
}

CMD:buygun(playerid, params[]) {
	new gunname[32], ammo;
    if(sscanf(params, "s[32]d", gunname, ammo)) return SendClientMessage(playerid, -1, "/buygun <Gun Name> <Ammo>");
    GivePlayerWeapon(playerid, GetGunName(gunname), ammo);
    GivePlayerMoney(playerid, -500);
	return 1;
}

 

  • 1 month later...
  • 4 weeks later...
Posted
On 30.12.2017 at 1:37 AM, BuNiCu-RP said:

stock GetGunName(name) {
  	new id;
    switch(name) {
      case "Brass Knuckles": id = 1;
      case "Golf Club": id = 2;
      case "Nightstick": id = 3;
      case "Knife": id = 5;
      case "Baseball Bat": id = 6;
      case "Shovel": id = 7;
      case "AK47": id = 30;
    }
	return id;
}

CMD:buygun(playerid, params[]) {
	new gunname[32], ammo;
    if(sscanf(params, "s[32]d", gunname, ammo)) return SendClientMessage(playerid, -1, "/buygun <Gun Name> <Ammo>");
    GivePlayerWeapon(playerid, GetGunName(gunname), ammo);
    GivePlayerMoney(playerid, -500);
	return 1;
}

 

Se poate si asa dar e mai bine pe dialog

Ai nevoie de ajutor in scripting si nu ai bani? Te pot ajuta cu mare drag. Dar asta nu inseamna sa iti lucrez un Sistem de joc complet, daca ai nevoie de ajutor ma poti contacta pe Discord.ezgif-2-3a38433e2465.gif.9283810e304f5e405309769455e5e14b.gif

Posted
CMD:buygun(playerid, params[])
	return ShowPlayerDialog(playerid, 73, DIALOG_STYLE_TABLIST_HEADERS, "Buy a gun", "Weapon\tPrice\n\
																			   {FFFFFF}Pistol\t{00FF00}500$\n\
																			   {FFFFFF}Silenced Pistol\t{00FF00}500$\n\
																			   {FFFFFF}Deagle\t{00FF00}1000$\n\
																			   {FFFFFF}Shotgun\t{00FF00}1500$", "Buy", "Close");
modifici cu ce arme vrei si dupa modifici in OnDialogResponse(mai simplu pentru playeri).

 

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. For more details you can also review our Terms of Use and Privacy Policy.