I make a command in dialog but there some wrong. - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (
https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: I make a command in dialog but there some wrong. (
/showthread.php?tid=244552)
I make a command in dialog but there some wrong. -
GBLTeam - 27.03.2011
So i make a /askq in dialog and i need help ... When i type: /pitaj question admins will recive T%>< ...
Here is command and dialog:
pawn Код:
if(strcmp(cmd, "/pitaj", true) == 0)
{
if(IsPlayerConnected(playerid))
{
ShowPlayerDialog(playerid,REPORTMENU,DIALOG_STYLE_INPUT,"{FF0005}Pitaj:"," {FFC800}\nPisite za sta vi treba pomoc?","U redu","Izlaz");
}
return 1;
}
Dialog:
pawn Код:
if(response)
{
if(dialogid == REPORTMENU)
{
new str[160];
GetPlayerName(playerid, str, MAX_PLAYER_NAME);
for (new i = 0; i < MAX_PLAYER_NAME; i++)
if (str[i] == '_')
str[i] = ' ';
if(CommandCheck[playerid] == 1)
{
return SendClientMessage(playerid, COLOR_WHITE, "Morate sacekati 1min pre ponovnog koriscenje ove komande.");
}
format(str, sizeof(str), "Pitanje od: %s-a: %s",playerid, str, (inputtext));
ABroadCast(COLOR_YELLOW2,str,1);
CommandCheck[playerid] = 1;
SetTimerEx("ResetCommandCheck", 11000, false, "i", playerid); // 120,000 MS = 2 minutes.
SendClientMessage(playerid, COLOR_YELLOW2, "Tvoje pitanje je poslano.");
}
}
Re: I make a command in dialog but there some wrong. -
GBLTeam - 27.03.2011
anyone?