16.01.2014, 08:02
(
Последний раз редактировалось RenSoprano; 16.01.2014 в 10:21.
)
First you will need to create your textdraws then declarate your vars.
Under OnPlayerConnect
Under OnPlayerDeath
Under OnGameModeInit
I'm from school so you will need to test
Код:
new pWanted[MAX_PLAYERS]; new Text3D:NameTag;[MAX_PLAYERS];
Код:
pWanted[playerid] = 0;
Код:
pWanted[killerid] += 1; if(pWanted[killerid] == 5) { SetPlayerWantedLevel(killerid, GetPlayerWantedLevel(killerid)+1); }
Код:
GetMostWantedPlayer() // Function by SuperVIper { new highPlayerWantedLevel, player = INVALID_PLAYER_ID, wl; for(new i = 0; i < MAX_PLAYERS; i++) { if(IsPlayerConnected(i)) { wl = GetPlayerWantedLevel(i); if(wl > highPlayerWantedLevel) { highPlayerWantedLevel = wl, player = i; } } } return player; }
Код:
SetTimer("checkmostwantedplayer", 1000, true);
Код:
forward checkmostwantedplayer(playerid); public checkmostwantedplayer() { for(new i=0; i<MAX_PLAYERS; i++) { if(IsPlayerConnected(i)) { new score[128], name[MAX_PLAYER_NAME]; GetPlayerName(i, name, sizeof(name)); format(score, sizeof(score), "MostWanted: %s(%d)",name, GetPlayerWantedLevel(i)); NameTag[playerid] = Create3DTextLabel(string, 0xFFFFFFFF, 0, 0, 0, 40, 0, 1 ); Attach3DTextLabelToPlayer(NameTag[playerid], playerid, 0.0, 0.0, 0.2); // With Label } } return 1; }