PHP код:
enum Playerinfos
{
Matou,
Morreu,
Score,
}
new pInfo[MAX_PLAYERS][Playerinfos];
//oNGAMEMODEINIT
SetTimer("info", 1000, 1);
//Public Onde esta Mostrando
forward info(playerid);
public info(playerid)
{
new STR[128], str2[128], str3[128], str4[128], str5[128];
format(STR, sizeof(STR), "~b~Matou:~w~ %d", pInfo[playerid][Matou]);
PlayerTextDrawSetString(playerid, INFO[2][playerid], STR);
format(str3, sizeof(str3), "~b~Morreu:~w~ %d", pInfo[playerid][Morreu]);
PlayerTextDrawSetString(playerid, INFO[3][playerid], str3);
format(str2, sizeof(str2), "~b~Score:~w~ %d",GetPlayerScore(playerid));
PlayerTextDrawSetString(playerid, INFO[5][playerid], str2);
format(str4, sizeof(str4), "~b~Nick:~w~ %s",PlayerName(playerid));
PlayerTextDrawSetString(playerid, INFO[6][playerid], str4);
format(str5, sizeof(str5), "Seje Bem Vindo Ao Servidor ~b~%s ~w~Para Algumas Informaзoes Use /regras & /comandos",PlayerName(playerid));
PlayerTextDrawSetString(playerid, Tela_LoginNome[playerid], str5);
return 1;
}
//Public OnPlayerDeath
pInfo[killerid][Matou]++;
pInfo[playerid][Morreu]++;
//Salvando
DOF2_SetInt(String, "Morreu", pInfo[playerid][Morreu]);
DOF2_SetInt(String, "Matou", pInfo[playerid][Matou]);
DOF2_SetInt(String,"Score", GetPlayerScore(playerid));
//Carregando
SetPlayerScore(playerid, DOF2_GetInt(String,"Score"));
pInfo[playerid][Matou] = DOF2_GetInt(String, "Matou");
pInfo[playerid][Morreu] = DOF2_GetInt(String, "Morreu");
Tуpicos e mais tуpicos falando sobre isso.. Em fim.
PHP код:
public OnPlayerDeath(playerid, killerid, reason)
{
SendDeathMessage(killerid, playerid, reason); // Mostra a morte na Kill List
return 1;
}