13.03.2013, 22:31
Hi, i'm using sscanf for cmd system and DINI for Users.
I've created a /report command. I'm Italian, then the command has Italian Phrases.
THE PROBLEM: This cmd doesn't send message to Admins. Then, this script doesn't work:
I've already Tried with forward MessageToAdmins(ecc ecc ecc); public MessageToAdmins(ecc ecc ecc); but it does the same problem. Why?
Thanks for Replies
I've created a /report command. I'm Italian, then the command has Italian Phrases.
Код:
dcmd_segnala(playerid,params[])
{
new id;
new motivo[256];
new utente[24];
new criminale[24];
new string[256];
if(sscanf(params,"us",id,motivo)) SendClientMessage(playerid,COLOR_YELLOW,"Usa: /segnala <id/nome> <motivo> - Serve per segnalare un utente fastidioso agli Admin in Linea!");
else
{
if(id == INVALID_PLAYER_ID) SendClientMessage(playerid,0xFF0000AA,"ID non connesso!");
else
{
GetPlayerName(playerid,utente,sizeof(utente));
GetPlayerName(id,criminale,sizeof(criminale));
for(new i = 0; i < MAX_PLAYERS; i++)
{
if(IsPlayerConnected(i))
{
if(Account[i][pAdmin] >=1)
{
format(string,sizeof(string),"{0000FF}<<<---[SEGNALAZIONE]--->>> {FFFFFF}[ %s ] {0000FF}ha segnalato {FFFFFF}[ %s ]{0000FF}----{FFFFFF}[{0000FF}Motivo:{FFFFFF} %s ]{0000FF} <<<---[SEGNALAZIONE]--->>>",utente,criminale,motivo);
SendClientMessage(i,COLOR_WHITE,string);
}
}
}
format(string,sizeof(string),"[REPORT]--->>> [ %s ] ha segnalato [ %s ]----[Motivo: %s ]",utente,criminale,motivo);
print(string);
new File[300];
format(File,sizeof(File),PATH,criminale);
format(string,sizeof(string),"Da: %s - Per: %s",utente,motivo);
dini_Set(File,"Report",string);
Account[id][pReportNr]++;
}
}
return 1;
}
Код:
for(new i = 0; i < MAX_PLAYERS; i++)
{
if(IsPlayerConnected(i))
{
if(Account[i][pAdmin] >=1)
{
format(string,sizeof(string),"{0000FF}<<<---[SEGNALAZIONE]--->>> {FFFFFF}[ %s ] {0000FF}ha segnalato {FFFFFF}[ %s ]{0000FF}----{FFFFFF}[{0000FF}Motivo:{FFFFFF} %s ]{0000FF} <<<---[SEGNALAZIONE]--->>>",utente,criminale,motivo);
SendClientMessage(i,COLOR_WHITE,string);
}
}
}
Thanks for Replies


