24.04.2016, 01:29
ALGUEM AE PODE ME AJUDAR?, QUANDO UM PLAYER MATA O OUTRO, O SPREE CONTA PROS 2 PLAYERS COMO FAЗO PARA CONCERTAR ISSO?, ESTA AE UMA PARTE DO CODIGO.
Код:
new Text:scoreandping[MAX_PLAYERS]; new Updater; new pkills[MAX_PLAYERS]; forward ScorenPing(playerid); public ScorenPing(playerid) { for(new i = 0; i < MAX_PLAYERS; i++) { if(IsPlayerConnected(i)) { new string[256]; format(string,sizeof(string)," ~w~] ~r~~h~Score: ~w~%d~n~ ~w~] ~r~~h~Ping: ~w~%d~n~ ~w~] ~r~~h~Fps: ~w~%d~n~ ~w~] ~r~~h~Spree: ~w~%d",GetPlayerScore(i),GetPlayerPing(i),GetPlayerFPS(i),pkills); TextDrawSetString(scoreandping[i], string); } } } public OnPlayerDeath(playerid, killerid, reason) { pkills[playerid] = 0; pkills[killerid]++; GameTextForPlayer(killerid,"~r~+1 ~w~Kill!",1500,6); return 1; } stock GetPlayerFPS(playerid) { SetPVarInt(playerid, "DrunkL", GetPlayerDrunkLevel(playerid)); if(GetPVarInt(playerid, "DrunkL") < 100) { SetPlayerDrunkLevel(playerid, 2000); } else { if(GetPVarInt(playerid, "LDrunkL") != GetPVarInt(playerid, "DrunkL")) { SetPVarInt(playerid, "FPS", (GetPVarInt(playerid, "LDrunkL") - GetPVarInt(playerid, "DrunkL"))); SetPVarInt(playerid, "LDrunkL", GetPVarInt(playerid, "DrunkL")); if((GetPVarInt(playerid, "FPS") > 0) && (GetPVarInt(playerid, "FPS") < 256)) { return GetPVarInt(playerid, "FPS") - 1; } } } return 0; }