Nie mam ?adnych warning?w ani error?w jak co?...
CMD:pm(playerid,cmdtext[]){
new Wiadomosc[128];
new string[255];
new gracz;
if(sscanf(cmdtext,"us[128]",gracz,Wiadomosc)){
SendClientMessage(playerid, COLOR_RED, " (info) Wpisz: /pm [id gracza] [wiadomo??]");
return 1;
}
if(gracz < 0 || gracz >= MAX_GRACZY || !IsPlayerConnected(gracz)) return SendClientMessage(playerid, COLOR_RED, " (b??d) Nie ma takiego gracza!");
if(!ChcePM[gracz]) return SendClientMessage(playerid, COLOR_RED, " (b??d) Ten gracz ma zablokowane prywatne wiadomo?ci");
pmid1 = playerid;
pmid2 = gracz;
new wysylacz[MAX_PLAYER_NAME];
new adresat[MAX_PLAYER_NAME];
GetPlayerName(playerid, wysylacz, sizeof(wysylacz));
GetPlayerName(gracz, adresat, sizeof(adresat));
format(string, sizeof(string), " » Wiadomo?? od %s (id %d): %s", wysylacz,playerid,Wiadomosc);
SendClientMessage(gracz,0xFFFF00FF, string);
format(string, sizeof(string), " » Wys?ano wiadomo?? do %s (id %d): %s", adresat,gracz,Wiadomosc);
SendClientMessage(playerid,0xFFFF00FF, string);
if(PMlog == 1){
new g,m,s;
gettime(g,m,s);
new File:PMLogFile = fopen(FILE_PMLOG, io_append);
format(string, sizeof string, "[%02d:%02d:%02d] %s >>> %s : %s\r\n",g,m,s,PlayerName(playerid),PlayerName(gracz),Wiadomosc);
fwrite(PMLogFile, string);
fclose(PMLogFile);
}
if(podgladPM == 1){
format(string, sizeof(string), "%s(%d) -> %s(%d): %s", wysylacz,playerid,adresat,gracz,Wiadomosc);
SendClientMessageToAdminsPM(0xFFCC2299,string);
}
PlayerPlaySound(gracz, 1139, 0, 0, 0);
if(ChceAnn[gracz]){
GameTextForPlayer(gracz, "PW", 2000, 1);
}
return 1;
}
|