29.03.2017, 18:33
olб, to fazendo um sistema de salvar kill do player e aparecer como pontos para o player sу que quando eu logo com meu amigo os Pontos sу ficam para o id 0 nгo aparece para mim, isso tambйm estб ocorrendo em um sistema de sono que eu havia testado, sу funciona para o id 0 e sempre q aparece pra um aparece bugado mt zuado isso, ta aqui o code, me ajudem a ver o porque disso por favor ?!
ME AJUDEM POR FAVOR ;-;
o textdraw sу aparece para o ID 0 quem souber agradeзo
Quote:
enum e_PlayerStats { pMatou, pMorreu }; new pStats[MAX_PLAYERS][e_PlayerStats]; //Texts new PlayerText:StatusBox[MAX_SLOTS]; new PlayerText:StatusInfo[MAX_SLOTS]; new PlayerText:StatusMatou[MAX_SLOTS]; new PlayerText:StatusMorreu[MAX_SLOTS]; new Updater; //Ongamemodeinit Updater = SetTimer("UpdateText",1000,true); //Ongamemodeexit KillTimer(Updater); //OnPlayerConnect StatusBox[playerid] = CreatePlayerTextDraw(playerid, 621.199951, 288.220001, "usebox"); PlayerTextDrawLetterSize(playerid, StatusBox[playerid], 0.000000, 7.564816); PlayerTextDrawTextSize(playerid, StatusBox[playerid], 493.200012, 0.000000); PlayerTextDrawAlignment(playerid, StatusBox[playerid], 1); PlayerTextDrawColor(playerid, StatusBox[playerid], 0); PlayerTextDrawUseBox(playerid, StatusBox[playerid], true); PlayerTextDrawBoxColor(playerid, StatusBox[playerid], 102); PlayerTextDrawSetShadow(playerid, StatusBox[playerid], 0); PlayerTextDrawSetOutline(playerid, StatusBox[playerid], 0); PlayerTextDrawFont(playerid, StatusBox[playerid], 0); StatusInfo[playerid] = CreatePlayerTextDraw(playerid, 517.599975, 289.706604, "~h~~y~Status:"); PlayerTextDrawLetterSize(playerid, StatusInfo[playerid], 0.449999, 1.600000); PlayerTextDrawAlignment(playerid, StatusInfo[playerid], 1); PlayerTextDrawColor(playerid, StatusInfo[playerid], -1); PlayerTextDrawSetShadow(playerid, StatusInfo[playerid], 0); PlayerTextDrawSetOutline(playerid, StatusInfo[playerid], 1); PlayerTextDrawBackgroundColor(playerid, StatusInfo[playerid], 51); PlayerTextDrawFont(playerid, StatusInfo[playerid], 2); PlayerTextDrawSetProportional(playerid, StatusInfo[playerid], 1); StatusMatou[playerid] = CreatePlayerTextDraw(playerid, 508.799987, 310.613281, "Matou:"); PlayerTextDrawLetterSize(playerid, StatusMatou[playerid], 0.449999, 1.600000); PlayerTextDrawAlignment(playerid, StatusMatou[playerid], 1); PlayerTextDrawColor(playerid, StatusMatou[playerid], -1); PlayerTextDrawSetShadow(playerid, StatusMatou[playerid], 0); PlayerTextDrawSetOutline(playerid, StatusMatou[playerid], 1); PlayerTextDrawBackgroundColor(playerid, StatusMatou[playerid], 51); PlayerTextDrawFont(playerid, StatusMatou[playerid], 3); PlayerTextDrawSetProportional(playerid, StatusMatou[playerid], 1); StatusMorreu[playerid] = CreatePlayerTextDraw(playerid, 508.000000, 330.026519, "Morreu:"); PlayerTextDrawLetterSize(playerid, StatusMorreu[playerid], 0.449999, 1.600000); PlayerTextDrawAlignment(playerid, StatusMorreu[playerid], 1); PlayerTextDrawColor(playerid, StatusMorreu[playerid], -1); PlayerTextDrawSetShadow(playerid, StatusMorreu[playerid], 0); PlayerTextDrawSetOutline(playerid, StatusMorreu[playerid], 1); PlayerTextDrawBackgroundColor(playerid, StatusMorreu[playerid], 51); PlayerTextDrawFont(playerid, StatusMorreu[playerid], 3); PlayerTextDrawSetProportional(playerid, StatusMorreu[playerid], 1); pStats[playerid][pMatou] = 0; pStats[playerid][pMorreu] = 0; //Onplayerdisconnect PlayerTextDrawDestroy(playerid, PlayerText:StatusBox[playerid]); PlayerTextDrawDestroy(playerid, PlayerText:StatusInfo[playerid]); PlayerTextDrawDestroy(playerid, PlayerText:StatusMatou[playerid]); PlayerTextDrawDestroy(playerid, PlayerText:StatusMorreu[playerid]); //OnPlayerSpawn PlayerTextDrawShow(playerid, PlayerText:StatusBox[playerid]); PlayerTextDrawShow(playerid, PlayerText:StatusInfo[playerid]); PlayerTextDrawShow(playerid, PlayerText:StatusMatou[playerid]); PlayerTextDrawShow(playerid, PlayerText:StatusMorreu[playerid]); //Onplayerdeath pStats[playerid][pMorreu]++; if(killerid != 0xFFFF) { pStats[killerid][pMatou]++; } public UpdateText(playerid) { new str[128]; format(str, sizeof(str), "Matou: ~h~~g~%d", pStats[playerid][pMatou]); PlayerTextDrawSetString(playerid, StatusMatou[playerid], str); format(str, sizeof(str), "Morreu: ~h~~r~%d", pStats[playerid][pMorreu]); PlayerTextDrawSetString(playerid, StatusMorreu[playerid], str); return 1; } |
o textdraw sу aparece para o ID 0 quem souber agradeзo