Jump to content
  • 0

Eroare /ashop


Syntexel

Question

Problema intalnita (descriere): Am reusit sa creez comanda /ashop, am facut ca atunci cand adminul selecteaza optiunea de a sterge FP-ul sa ii fie setat la 0, insa am o problema. Vreau ca atunci cand respectivul a selectat "Clear FP" sa-i apara un text de genul: "FP-ul tau a fost setat la 0", mie imi arata acest text atunci cand tasteaza comanda /ashop.
Ero(area / rile) / warning-(ul / urile): -
Liniile de cod / sursa / script-ul(obligatoriu): CMD:ashop(playerid,params[])

{
if(gPlayerLogged[playerid] == 0) return SendClientMessage(playerid, COLOR_LIGHTRED, "You need to login first.");
if (PlayerInfo[playerid][pAdmin] < 1) return SCM(playerid,COLOR_WHITE,AdminOnly);
 
{
ShowPlayerDialog(playerid, DIALOG_ASHOP, DIALOG_STYLE_LIST, "Admin shop:", "Clear FP", "Select", "Close");
}
new id,fp;
PlayerInfo[id][pFpunish] = 0;
Update(id,pFpunishx);
SendClientMessage(playerid, COLOR_YELLOW, "Faction-Punishul tau a fost sters cu succes".);
return 1;
}

Imagini / Video (optional): 
Ati incercat sa rezolvati singur?: Da.

post-17934-0-37780700-1424375820_thumb.p

Link to comment
Share on other sites

8 answers to this question

Recommended Posts

  • 0

Nu prea inteleg raspunsul, fi mai explicit putin; incearca sa postezi toata comanda ca si cum ar iesii bine.

Nu prea cred ca ai facut tu comanda aia de vreme ce nu stii sa selectezi dialog DIALOG_ASHOP din OnDialogResponse.

 

In fine, sa iti explic cum sa faci, dar mai intai de toate, te rog sa postezi aici dialogul "DIALOG_ASHOP" din publicul "OnDialogResponse".

242086.png

Link to comment
Share on other sites

  • 0
enum
{
	DIALOG_ASHOP
}

CMD:ashop(playerid,params[])
{
	if(gPlayerLogged[playerid] == 0)
		return SendClientMessage(playerid, COLOR_LIGHTRED, "You need to login first.");
	if (PlayerInfo[playerid][pAdmin] < 1)
		return SCM(playerid,COLOR_WHITE,AdminOnly);
	{
	ShowPlayerDialog(playerid, DIALOG_ASHOP, DIALOG_STYLE_LIST, "Admin shop:", "Clear FP", "Select", "Close");
	}
	return 1;
}

public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
	if ( dialogid == DIALOG_ASHOP )
	{
		if ( response )
		{
			switch ( listitem )
			{
			    case 0:
			    {
					new id,fp;
					PlayerInfo[id][pFpunish] = 0;
					Update(id,pFpunishx);
					SendClientMessage(playerid, COLOR_YELLOW, "Faction-Punishul tau a fost sters cu succes".);
				}
			}
		}
	}
	return 1;
}

Edited by andy47
Link to comment
Share on other sites

  • 0

Poi ok, si ce e gresit ? Nu se trimite mesajul sau ce ? Ca am citit din nou primul post, si nu inteleg nimic ...  Prin comanda asta stergi tu cuiva faction punish , sau cum ?

Poate nu stie sa schimbe mesajul din chat, am dreptate?

242086.png

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
×
×
  • 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.