Jump to content

Recommended Posts

Posted (edited)
if(registrul tau de date [pinfo] < 15000) 
    return SendClientMessage(playerid, -1, !"Nu ai bani suficienti");

Baga asta inainte de GivePlayerWeapon introducand registrul tau de bani, exemplu if(PlayerInfo[playerid][Cash] < 10000)

Si vezi ca ai o ) in plus la playerid cand retragi banii jucatorului.

 

Edited by HEMINGWAY
Posted (edited)

este bine asa ? ca imi spune ca nu am definit pinfo ! Este un gamemode de la zero iar aici este primele linii scrise !

 

Screenshot 2021-10-25 144628.png

Edited by GamerulFOX
Posted
public OnPlayerCommandText(playerid, cmdtext[]) {
	if(strcmp("/vreauarma", cmdtext, true, 10) == 0) {
		if(GetPlayerMoney(playerid) < 15000) return SendClientMessage(playerid, 0x00FF00FF, "Nu ai bani suficienti.");
		GivePlayerWeapon(playerid, 24, 100);
		SendClientMessage(playerid, 0x5175adFF, "(-) Ai cumparat un Deagle pentru $15.000.");
		GivePlayerMoney(playerid, -15000);
		return 1;
	}
}

Poftim.

  • 2 weeks later...
Posted
On 10/25/2021 at 2:16 PM, GamerulFOX said:

Cine ma poate ajuta la aceasta comanda cu o verifica daca are sub 15 000 de dolari sa nu poate sa cumpere ?

Screenshot 2021-10-25 141538.png

Daca te referi cand are sub 15.000$ sa nu o poata cumpara foloseste asta.

if(pInfo[playerid][pMoney] < 15000) return SCM(playerid, COLOR_INFO, "Eroare: Nu ai suma necesara de bani."); //Modifici dupa cum ai tu in gamemode.

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.