21.06.2013, 06:33
Quote:
Looking for someone who can script something like this.
/helpme. *A black box pops up, and you need to type what you need help with* - The box will say, on the top, Please type what you need help with, an administrator will be with you shortly. And if no admin's are online, it will stay in the helpme portion. Admins need to do /assistances, in-order to check them. |
PM me if you have any trouble.
pawn Code:
CMD:helpme(playerid,params[])
{
ShowPlayerDialog(playerid,100,DIALOG_STYLE_MSGBOX,"Help Dialog","Please type what you need help with, an administrator will be with you shortly","Send","");
return 1;
}
CMD:assistances(playerid, params[])
{
if(IsPlayerAdmin(playerid))
{
new string[128], File: file = fopen("help.cfg", io_read), idx=1;
SendClientMessage(playerid, 0xF11111AA, "Assistance Messages");
while(fread(file, string))
{
format(string, sizeof(string), "%d) %s", idx, string);
SendClientMessage(playerid, 0xFFFFFFAA, string);
idx ++;
}
fclose(file);
}
else
{
return 0;
}
return 1;
}
// OnDialogResponse
if(dialogid == 100)
{
new File: file = fopen("help.cfg", io_append)
new name1[MAX_PLAYER_NAME], string[128], message[128];
GetPlayerName(playerid,name1,sizeof(name1));
if(sscanf(inputtext,"s", message)) return ShowPlayerDialog(playerid, 100, DIALOG_STYLE_INPUT, "Help Dialog", "Please type what you need help with, an administrator will be with you shortly.", "Send", "");
if(!response) return 0;
format(string, sizeof(string), "%s - %s",name1,message);
fwrite(file, string);
return 1;
}