Bom Loguei No Pc do Meu Irmao Para Testar uns Comandos Dai Percebi Que As TextDraws Estao Bugando , Nao aparece a Funзao Aparece So Do Geito Que Eu Criei Vou Postar Elas Aki Me AJudem Por Favor !
PHP код:
//---TOPO GM---//
new PlayerText:INFO[9][MAX_PLAYERS];
//---OnGameModeInit---//
SetTimer("info", 1000, true);
//---OnPlayerConnect---//
INFO[0][playerid] = CreatePlayerTextDraw(playerid,510.000000, 330.000000, "_");
PlayerTextDrawBackgroundColor(playerid,INFO[0][playerid], 255);
PlayerTextDrawFont(playerid,INFO[0][playerid], 1);
PlayerTextDrawLetterSize(playerid,INFO[0][playerid], 0.500000, 12.000000);
PlayerTextDrawColor(playerid,INFO[0][playerid], -1);
PlayerTextDrawSetOutline(playerid,INFO[0][playerid], 0);
PlayerTextDrawSetProportional(playerid,INFO[0][playerid], 1);
PlayerTextDrawSetShadow(playerid,INFO[0][playerid], 1);
PlayerTextDrawUseBox(playerid,INFO[0][playerid], 1);
PlayerTextDrawBoxColor(playerid,INFO[0][playerid], 100);
PlayerTextDrawTextSize(playerid,INFO[0][playerid], 632.000000, 10.000000);
PlayerTextDrawSetSelectable(playerid,INFO[0][playerid], 0);
INFO[1][playerid] = CreatePlayerTextDraw(playerid,542.000000, 325.000000, "Info");
PlayerTextDrawBackgroundColor(playerid,INFO[1][playerid], 255);
PlayerTextDrawFont(playerid,INFO[1][playerid], 0);
PlayerTextDrawLetterSize(playerid,INFO[1][playerid], 0.900000, 3.000000);
PlayerTextDrawColor(playerid,INFO[1][playerid], -1);
PlayerTextDrawSetOutline(playerid,INFO[1][playerid], 0);
PlayerTextDrawSetProportional(playerid,INFO[1][playerid], 1);
PlayerTextDrawSetShadow(playerid,INFO[1][playerid], 1);
PlayerTextDrawSetSelectable(playerid,INFO[1][playerid], 0);
INFO[2][playerid] = CreatePlayerTextDraw(playerid,510.000000, 360.000000, "~b~Matou:~w~ --");
PlayerTextDrawBackgroundColor(playerid,INFO[2][playerid], 255);
PlayerTextDrawFont(playerid,INFO[2][playerid], 1);
PlayerTextDrawLetterSize(playerid,INFO[2][playerid], 0.500000, 1.000000);
PlayerTextDrawColor(playerid,INFO[2][playerid], -1);
PlayerTextDrawSetOutline(playerid,INFO[2][playerid], 0);
PlayerTextDrawSetProportional(playerid,INFO[2][playerid], 1);
PlayerTextDrawSetShadow(playerid,INFO[2][playerid], 1);
PlayerTextDrawSetSelectable(playerid,INFO[2][playerid], 0);
INFO[3][playerid] = CreatePlayerTextDraw(playerid,510.000000, 375.000000, "~b~Morreu:~w~ --");
PlayerTextDrawBackgroundColor(playerid,INFO[3][playerid], 255);
PlayerTextDrawFont(playerid,INFO[3][playerid], 1);
PlayerTextDrawLetterSize(playerid,INFO[3][playerid], 0.500000, 1.000000);
PlayerTextDrawColor(playerid,INFO[3][playerid], -1);
PlayerTextDrawSetOutline(playerid,INFO[3][playerid], 0);
PlayerTextDrawSetProportional(playerid,INFO[3][playerid], 1);
PlayerTextDrawSetShadow(playerid,INFO[3][playerid], 1);
PlayerTextDrawSetSelectable(playerid,INFO[3][playerid], 0);
INFO[4][playerid] = CreatePlayerTextDraw(playerid,510.000000, 390.000000, "~b~Spree:~w~ --");
PlayerTextDrawBackgroundColor(playerid,INFO[4][playerid], 255);
PlayerTextDrawFont(playerid,INFO[4][playerid], 1);
PlayerTextDrawLetterSize(playerid,INFO[4][playerid], 0.500000, 1.000000);
PlayerTextDrawColor(playerid,INFO[4][playerid], -1);
PlayerTextDrawSetOutline(playerid,INFO[4][playerid], 0);
PlayerTextDrawSetProportional(playerid,INFO[4][playerid], 1);
PlayerTextDrawSetShadow(playerid,INFO[4][playerid], 1);
PlayerTextDrawSetSelectable(playerid,INFO[4][playerid], 0);
INFO[5][playerid] = CreatePlayerTextDraw(playerid,510.000000, 405.000000, "~b~Score:~w~ --");
PlayerTextDrawBackgroundColor(playerid,INFO[5][playerid], 255);
PlayerTextDrawFont(playerid,INFO[5][playerid], 1);
PlayerTextDrawLetterSize(playerid,INFO[5][playerid], 0.500000, 1.000000);
PlayerTextDrawColor(playerid,INFO[5][playerid], -1);
PlayerTextDrawSetOutline(playerid,INFO[5][playerid], 0);
PlayerTextDrawSetProportional(playerid,INFO[5][playerid], 1);
PlayerTextDrawSetShadow(playerid,INFO[5][playerid], 1);
PlayerTextDrawSetSelectable(playerid,INFO[5][playerid], 0);
INFO[6][playerid] = CreatePlayerTextDraw(playerid,510.000000, 427.000000, "~b~Nome:~w~ NomeDoNosso_Lindo_Jogador");
PlayerTextDrawBackgroundColor(playerid,INFO[6][playerid], 255);
PlayerTextDrawFont(playerid,INFO[6][playerid], 1);
PlayerTextDrawLetterSize(playerid,INFO[6][playerid], 0.200000, 1.000000);
PlayerTextDrawColor(playerid,INFO[6][playerid], -1);
PlayerTextDrawSetOutline(playerid,INFO[6][playerid], 0);
PlayerTextDrawSetProportional(playerid,INFO[6][playerid], 1);
PlayerTextDrawSetShadow(playerid,INFO[6][playerid], 1);
PlayerTextDrawSetSelectable(playerid,INFO[6][playerid], 0);
INFO[7][playerid] = CreatePlayerTextDraw(playerid,534.000000, 304.000000, "00/~b~00~w~/00");
PlayerTextDrawBackgroundColor(playerid,INFO[7][playerid], 255);
PlayerTextDrawFont(playerid,INFO[7][playerid], 1);
PlayerTextDrawLetterSize(playerid,INFO[7][playerid], 0.400000, 1.000000);
PlayerTextDrawColor(playerid,INFO[7][playerid], -1);
PlayerTextDrawSetOutline(playerid,INFO[7][playerid], 0);
PlayerTextDrawSetProportional(playerid,INFO[7][playerid], 1);
PlayerTextDrawSetShadow(playerid,INFO[7][playerid], 1);
PlayerTextDrawSetSelectable(playerid,INFO[7][playerid], 0);
INFO[8][playerid] = CreatePlayerTextDraw(playerid,542.000000, 316.000000, "~b~00~w~:00:00");
PlayerTextDrawBackgroundColor(playerid,INFO[8][playerid], 255);
PlayerTextDrawFont(playerid,INFO[8][playerid], 1);
PlayerTextDrawLetterSize(playerid,INFO[8][playerid], 0.300000, 1.000000);
PlayerTextDrawColor(playerid,INFO[8][playerid], -1);
PlayerTextDrawSetOutline(playerid,INFO[8][playerid], 0);
PlayerTextDrawSetProportional(playerid,INFO[8][playerid], 1);
PlayerTextDrawSetShadow(playerid,INFO[8][playerid], 1);
PlayerTextDrawSetSelectable(playerid,INFO[8][playerid], 0);
//---OnPlayerSpawn---//
PlayerTextDrawShow(playerid, INFO[0][playerid]);
PlayerTextDrawShow(playerid, INFO[1][playerid]);
PlayerTextDrawShow(playerid, INFO[2][playerid]);
PlayerTextDrawShow(playerid, INFO[3][playerid]);
PlayerTextDrawShow(playerid, INFO[4][playerid]);
PlayerTextDrawShow(playerid, INFO[5][playerid]);
PlayerTextDrawShow(playerid, INFO[6][playerid]);
PlayerTextDrawShow(playerid, INFO[7][playerid]);
PlayerTextDrawShow(playerid, INFO[8][playerid]);
//--Public Info---//
forward info(playerid);
public info(playerid)
{
new STR[128], str2[128], str3[128], str4[128], str5[128];
format(STR, sizeof(STR), "~b~Matou:~w~ %d", pInfo[playerid][Matou]);
PlayerTextDrawSetString(playerid, INFO[2][playerid], STR);
format(str3, sizeof(str3), "~b~Morreu:~w~ %d", pInfo[playerid][Morreu]);
PlayerTextDrawSetString(playerid, INFO[3][playerid], str3);
format(str2, sizeof(str2), "~b~Score:~w~ %d",GetPlayerScore(playerid));
PlayerTextDrawSetString(playerid, INFO[5][playerid], str2);
format(str4, sizeof(str4), "~b~Nick:~w~ %s",PlayerName(playerid));
PlayerTextDrawSetString(playerid, INFO[6][playerid], str4);
format(str5, sizeof(str5), "Seje Bem Vindo Ao Servidor ~b~%s ~w~Para Algumas Informaзoes Use /regras & /comandos", PlayerName(playerid));
PlayerTextDrawSetString(playerid, Tela_LoginNome[playerid], str5);
return 1;
}
Dк PlayerTextDrawShow pra atualizar as textdraws toda vez que vocк modificб-las...
Toda vez que vocк modificar uma textdraw vocк precisa mostrar ela pro player novamente pra atualizar, exemplo :
Seu timer tб errado, precisa ser timerex na onplayerconnect, vocк tambйm tб usando muita memуria desnecessaria, nгo tem porque criar uma string pra cada format nesse seu cуdigo, por isso vocк estб com problemas de stack heap size.
Na verdade vocк nem precisa de timer, seu cуdigo tб fazendo um loop de 100ms com o timer quando vocк poderia usar apenas seu codigo na onplayerconnect.