04.04.2014, 17:51
Код:
if(GetPlayerWantedLevel(killerid) >= 5) { wantedlabel = Create3DTextLabel("--Most Wanted--", GREEN, 30.0, 40.0, 50.0, 40.0, 0); Attach3DTextLabelToPlayer(wantedlabel, killerid, 0.0, 0.0,-0.5); }
Код:
if(GetPlayerWantedLevel(playerid) >= 5) { DeletePlayer3DTextLabel(playerid, PlayerText3D:wantedlabel); }
FULL CODE:
Код:
public OnPlayerDeath(playerid, killerid, reason) { //racesystem if(Joined[playerid] == true) { JoinCount--; Joined[playerid] = false; DestroyVehicle(CreatedRaceVeh[playerid]); DisablePlayerRaceCheckpoint(playerid); CPProgess[playerid] = 0; KillTimer(InfoTimer[playerid]); SetPlayerVirtualWorld(playerid, 0); SetVehicleToRespawn(GetPlayerVehicleID(playerid)); SetVehicleVirtualWorld(GetPlayerVehicleID(playerid),0); } if(BuildRace == playerid+1) BuildRace = 0; //Killingspree new str[ 256 ], KillerName[MAX_PLAYER_NAME]; GetPlayerName(killerid, KillerName, sizeof(KillerName)); //End KS GodMode[playerid] = 0; SendDeathMessage(killerid, playerid, reason); if(killerid != INVALID_PLAYER_ID) { SetPlayerScore(killerid, GetPlayerScore(killerid) + 1); SetPlayerWantedLevel(killerid, (GetPlayerWantedLevel(killerid) + 1)); /*if(GetPlayerWantedLevel(killerid)>=5) { GetPlayerPos( playerid, X, Y, Z ); CreatePlayer3DTextLabel(playerid,"Most Wanted",0x008080FF,X,Y,Z,40.0); }*/ if(GetPlayerWantedLevel(killerid) >= 5) { wantedlabel = Create3DTextLabel("--Most Wanted--", GREEN, 30.0, 40.0, 50.0, 40.0, 0); Attach3DTextLabelToPlayer(wantedlabel, killerid, 0.0, 0.0,-0.5); } DeletePlayer3DTextLabel(playerid, PlayerText3D:wantedlabel); GameTextForPlayer(killerid,"~w~+1 Score~R~~N~+1 kill~N~ ~g~+1000$", 3000, 1); GivePlayerMoney(killerid, 1000); Streaks[killerid]++; TotalKills[killerid]++; if(Streaks[killerid] == 3) { format(str, sizeof(str), "%s {00FFEE}is on Triple Kill {FFAF00}(3 kills +3 Score!)", KillerName); //here, you're formatting the defined string and add the content (text) SendClientMessageToAll(0xADFF2FAA, str); SetPlayerScore(killerid, GetPlayerScore(killerid) + 2); } if(Streaks[killerid] == 5) { format(str, sizeof(str), "%s {F81414}is on Killing Spree {FFAF00}(5 Kills +5 Score!!)", KillerName); //got no creativity lmao lol//here, you're formatting the defined string and add the content (text) SendClientMessageToAll(0xADFF2FAA, str); SetPlayerScore(killerid, GetPlayerScore(killerid) + 4); } if(Streaks[killerid] == 10) { format(str, sizeof(str), "%s {B8FF02}is on UNSTOPPABLE {FFAF00}(10 Kills +10 Score!!!)", KillerName); //got no creativity lmao lol//here, you're formatting the defined string and add the content (text) SendClientMessageToAll(0xADFF2FAA, str); } } SetPlayerWantedLevel(playerid, 0); GivePlayerMoney(playerid, -1000); //GameTextForPlayer(playerid,"~R~W~B~A~G~S~W~T~P~E~G~D~N~~N~~N~~N~~N~~R~Rest ~W~In ~g~PEACE", 3000, 5); format(string, sizeof(string),"~G~You got Killed By~N~~w~ %s", KillerName); GameTextForPlayer(playerid, string, 3000, 3); return 1; }