01.07.2012, 20:00
Hello, i want to see an "Overlay" over the Head from a Person which have Wanteds. Like: "Name: ... Wanteds: ... Reason: ... " It works fine, only my "Update" funktion won't work and i dont know why. (( Sorry for my bad english. ))
Here my Code:
Here my Code:
Код:
ocmd:su(playerid,params[]) { if(IsACop(playerid) != 1) return SCM(playerid,COLOR_FADE2,"Du bist nicht befugt, diesen Befehl zu nutzen."); new giveplayer,reason[128]; if(sscanf(params,"us",giveplayer,reason)) return SCM(playerid,COLOR_FADE2,"Benutze: /su [PLAYER] [REASON]"); setcrime(giveplayer,1,reason,PlayerInfo[playerid][pName]); format(LastReason[giveplayer],256,"%s",reason); new string[128]; format(string,sizeof(string),"[ %d ] %s\nWantedLevel: %d\nGrund: %s",giveplayer,PlayerInfo[giveplayer][pName],PlayerInfo[giveplayer][pWanteds],LastReason[giveplayer]); if(HaveWantedText[giveplayer] == 0) { for(new i=0;i<MAX_PLAYERS;i++) { if(PlayerInfo[i][pFraktion] == 0 || PlayerInfo[i][pFraktion] == 1 || PlayerInfo[i][pFraktion] == 2) { WantedText[giveplayer] = CreatePlayer3DTextLabel(i,string,0xEE0000FF, 0.0, 0.0, 0.5, 60.0,giveplayer, INVALID_VEHICLE_ID, 0); <====== WORK HaveWantedText[giveplayer] = 1; } } } if(HaveWantedText[giveplayer] == 1) { for(new i=0;i<MAX_PLAYERS;i++) { if(PlayerInfo[i][pFraktion] == 0 || PlayerInfo[i][pFraktion] == 1 || PlayerInfo[i][pFraktion] == 2) { DeletePlayer3DTextLabel(i,WantedText[giveplayer]); // <========= DONT WORK WantedText[giveplayer] = CreatePlayer3DTextLabel(i,string,0xEE0000FF, 0.0, 0.0, 0.5, 60.0,giveplayer, INVALID_VEHICLE_ID, 0); // <====== WORK } } } return 1; }