27.03.2011, 17:25
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:
Dialog:
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;
}
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.");
}
}