07.02.2015, 15:06
Am creat un textdraw in care sa-mi apara cat timp mai am wanted si nu merge.
Am creat o variabila noua "new wanteddtimer; " si am pus la public-ul GameModeExitFunc() , "KillTimer(wanteddtimer);" si la public-ul OnGameModeInit (), "wanteddtimer = SetTimer("Wanteddtimer1", 1000, 1);" . Asta e tot ce am facut si tot nu merge
Code:
forward Wanteddtimer1(); public Wanteddtimer1() { new wanted; new string[256]; foreach(Player, x) { if(IsPlayerConnected(x)) { WantedLevel[x] += wanted; if(WantedLevel[x] > 0) { WantedLevel[x] = 6; } PlayerInfo[x][pWantedLevel]--; switch(PlayerInfo[x][pWantedLevel]) { case 1: { format(string, 500,"Wanted Timer: %d minutes", PlayerInfo[x][pWantedLevel] / 60); TextDrawSetString(wanted1[x], string); } } TextDrawSetString(wanted1[x], string); if(PlayerInfo[x][pWantedLevel] == 1) { PlayerInfo[x][pWantedLevel] = 0; //PlayerInfo[x][pJailTime] = 0; SendClientMessage(x, COLOR_WHITE, "Wanted Clear."); } } } return 1; }