Jump to content

Salut ! Cine ma poate ajuta cu o comanda ?


GamerulFOX

Recommended Posts

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
Link to comment
Share on other sites

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.

Link to comment
Share on other sites

  • 2 weeks later...
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.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.