Textdraw nгo carrega - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: Non-English (
https://sampforum.blast.hk/forumdisplay.php?fid=9)
+--- Forum: Languages (
https://sampforum.blast.hk/forumdisplay.php?fid=33)
+---- Forum: Português/Portuguese (
https://sampforum.blast.hk/forumdisplay.php?fid=34)
+---- Thread: Textdraw nгo carrega (
/showthread.php?tid=626270)
Textdraw nгo carrega -
LukeCage - 12.01.2017
So fica aparecendo loading... nгo aparece a patente.
Код:
public OnPlayerConnect(playerid) {
PatenteDraw[playerid] = TextDrawCreate(18.000000,428.000000, "loading...");
TextDrawAlignment(PatenteDraw[playerid],0);
TextDrawBackgroundColor(PatenteDraw[playerid],255);
TextDrawFont(PatenteDraw[playerid],3);
TextDrawLetterSize(PatenteDraw[playerid],0.355555,0.955555);
TextDrawColor(PatenteDraw[playerid],-1);
TextDrawSetOutline(PatenteDraw[playerid],1);
TextDrawSetProportional(PatenteDraw[playerid],1);
TextDrawSetShadow(PatenteDraw[playerid],1);
SetTimerEx("UpdatePatente", 2000, true, "i", playerid);
Patente[playerid] = Create3DTextLabel(PT, -1, 30.0, 40.0, 50.0, 40.0, 0, 0);
return 1;
}
public OnPlayerDisconnect(playerid) { return Delete3DTextLabel(Patente[playerid]); }
public OnPlayerSpawn(playerid) {
new
String[21],
Score = GetPlayerScore(playerid)
;
if(Score <= 25) { String = "Civil"; }
else if(Score <= 50) { String = "Sobrevivente"; }
else if(Score <= 75) { String = "Bandido"; }
else if(Score <= 100) { String = "Assassino"; }
else if(Score <= 125) { String = "Terrorista"; }
else if(Score <= 150) { String = "Maniaco"; }
else if(Score <= 175) { String = "Psicopata"; }
else if(Score <= 200) { String = "Serial Killer"; }
else if(Score >= 250) { String = "Chefao"; }
Attach3DTextLabelToPlayer(Patente[playerid], playerid, 0.0, 0.0, 0.5);
TextDrawShowForPlayer(playerid, PatenteDraw[playerid]);
return 1;
}
forward UpdatePatente(playerid);
public UpdatePatente(playerid) {
new Score = GetPlayerScore(playerid);
if(0 < Score < 25) TextDrawSetString(PatenteDraw[playerid], "~p~Civil");
else if(25 < Score < 50) TextDrawSetString(PatenteDraw[playerid], "~p~Sobrevivente");
else if(50 < Score < 75) TextDrawSetString(PatenteDraw[playerid], "~p~Bandido");
else if(75 < Score < 100) TextDrawSetString(PatenteDraw[playerid], "~p~Assassino");
else if(100 < Score < 125) TextDrawSetString(PatenteDraw[playerid], "~p~Terrorista");
else if(125 < Score < 150) TextDrawSetString(PatenteDraw[playerid], "~p~Maniaco");
else if(150 < Score < 175) TextDrawSetString(PatenteDraw[playerid], "~p~Psicopata");
else if(175 < Score < 200) TextDrawSetString(PatenteDraw[playerid], "~p~Serial Killer");
else if(Score > 250) TextDrawSetString(PatenteDraw[playerid], "~p~Chefao");
return 1;
}
stock PegarNome(playerid) {
new name[MAX_PLAYER_NAME];
GetPlayerName(playerid, name, MAX_PLAYER_NAME);
return name;
}
Re: Textdraw nгo carrega - Carlos001 - 12.01.2017
Код:
forward UpdatePatente(playerid);
public UpdatePatente(playerid) {
new Score = GetPlayerScore(playerid);
if(Score >= 0 && Score < 25) TextDrawSetString(PatenteDraw[playerid], "~p~Civil");
else if(25 < Score < 50) TextDrawSetString(PatenteDraw[playerid], "~p~Sobrevivente");
else if(50 < Score < 75) TextDrawSetString(PatenteDraw[playerid], "~p~Bandido");
else if(75 < Score < 100) TextDrawSetString(PatenteDraw[playerid], "~p~Assassino");
else if(100 < Score < 125) TextDrawSetString(PatenteDraw[playerid], "~p~Terrorista");
else if(125 < Score < 150) TextDrawSetString(PatenteDraw[playerid], "~p~Maniaco");
else if(150 < Score < 175) TextDrawSetString(PatenteDraw[playerid], "~p~Psicopata");
else if(175 < Score < 200) TextDrawSetString(PatenteDraw[playerid], "~p~Serial Killer");
else if(Score > 250) TextDrawSetString(PatenteDraw[playerid], "~p~Chefao");
return 1;
}
Cade os Crйditos do criador do FilterScript?
Programando e Gambiarrando! -
RazorGuigo - 13.01.2017
Vocк deve atualizar a textdraw, depois de trocar o texto!
PHP код:
public UpdatePatente(playerid) {
//code do score
TextDrawShowForPlayer(playerid, PatenteDraw[playerid]);
return 1;
}