Jump to content
  • 0

Nu stiu ce au comenzile


Question

Posted

Am inceput un gm nou si am bagat 2 comenzi. Am intrat pe server am scris comanda (/help) si imi scria unknown command.

Uitati aici OnPlayerCommandText. Nu stiu de ce nu merg. Va rog frumos ajutati-ma.

 public OnPlayerCommandText(playerid, cmdtext[])
{
	if (strcmp("/drugdealer", cmdtext, true, 10) == 0)
	{
	if(IsPlayerInRangeOfPoint(playerid, 3.5, 2007.0104,-1778.3186,17.3536))
	{
	ShowPlayerDialog(playerid, DRUGMENU, DIALOG_STYLE_LIST, "Drug Menu", "Marijuana ($500)\nEcstacy ($1000)\nCocaina ($1500)\nMeth ($2000)\nAcid ($2500)\nMushrooms ($3000)", "Select", "Cancel");
	}
 	else
	{
    SendClientMessage(playerid,COLOR_WHITE,"Nu esti langa un dealer de droguri!");
    }
	return 1;
	}
	if (strcmp("/help", cmdtext, true, 10) == 0)
    {
   	ShowPlayerDialog(playerid, help, DIALOG_STYLE_LIST, "Ai nevoie de ajutor?", "Comenzile (/cmds)\nRegulile (/reguli)\nCreditele (/credite)\nVrei Admin?\nVrei Vip?\nCasele", "OK", "Cancel");
	return 1;
	}
	return 0;
}

FreeMapper

8 answers to this question

Recommended Posts

Guest RockStar
Posted
if (strcmp("/help", cmdtext, true, 10) == 0)
    {
    ShowPlayerDialog(playerid, help, DIALOG_STYLE_LIST, "Ajutor", "Comenzile (/cmds)\nRegulile (/reguli)\nCreditele (/credite)\nVrei Admin?\nVrei Vip?\nCasele", "Ok", "Cancel");
    return 1;
    }

Guest RockStar
Posted

nu merge :| nush ce sai mai fac :|

Am testat comanda chiar acum si mie imi merge .

Probabil problema este in alta parte .

Posted

pune return 1 la sfarshit

Ce idiotenie ai putut sa spui.

public OnPlayerCommandText(playerid, cmdtext[])
{
	if( strcmp(cmdtext, "/drugdealer", true) == 0)
	{
		if(IsPlayerInRangeOfPoint(playerid, 3.5, 2007.0104,-1778.3186,17.3536))
		{
			ShowPlayerDialog(playerid, DRUGMENU, DIALOG_STYLE_LIST, "Drug Menu", "Marijuana ($500)\nEcstacy ($1000)\nCocaina ($1500)\nMeth ($2000)\nAcid ($2500)\nMushrooms ($3000)", "Select", "Cancel");
		}
		else
		{
			SendClientMessage(playerid,COLOR_WHITE,"Nu esti langa un dealer de droguri!");
		}
		return 1;
	}
	if( strcmp(cmdtext, "/help", true) == 0 )
    {
		ShowPlayerDialog(playerid, help, DIALOG_STYLE_LIST, "Ai nevoie de ajutor?", "Comenzile (/cmds)\nRegulile (/reguli)\nCreditele (/credite)\nVrei Admin?\nVrei Vip?\nCasele", "OK", "Cancel");
		return 1;
	}
	return 0;
}

Nu merge, dar am identitat putin.

E din cauza ca intr-un FS ai return 1; la OnPlayerCommandText, pune return 0;, de fapt, daca da Unknown command s-ar putea sa nu fie d'asta, dar incearca.

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.