21.06.2018, 05:17
heres the code
Код:
new PlayerText:WLvlTD[MAX_PLAYERS];
Код:
if(pInfo[playerid][pWanted] >= 6) { new lvl[9]; format(lvl, sizeof(lvl), "%d", pInfo[playerid][pWanted]); WLvlTD[playerid] = CreatePlayerTextDraw(playerid, 548.800109, 123.297790, lvl); //for wanted level displaying PlayerTextDrawLetterSize(playerid, WLvlTD[playerid], 0.396799, 1.838933); PlayerTextDrawTextSize(playerid, WLvlTD[playerid], -7.000000, 0.000000); PlayerTextDrawAlignment(playerid, WLvlTD[playerid], 1); PlayerTextDrawColor(playerid, WLvlTD[playerid], -5963521); PlayerTextDrawSetShadow(playerid, WLvlTD[playerid], -1); PlayerTextDrawSetOutline(playerid, WLvlTD[playerid], 2); PlayerTextDrawBackgroundColor(playerid, WLvlTD[playerid], 255); PlayerTextDrawFont(playerid, WLvlTD[playerid], 2); PlayerTextDrawSetProportional(playerid, WLvlTD[playerid], 1); wStars[playerid] = CreatePlayerTextDraw(playerid, 578.401123, 123.297912, "[] []"); PlayerTextDrawLetterSize(playerid, wStars[playerid], 0.355600, 2.048001); PlayerTextDrawTextSize(playerid, wStars[playerid], -225.000000, 0.000000); PlayerTextDrawAlignment(playerid, wStars[playerid], 3); PlayerTextDrawColor(playerid, wStars[playerid], -5963521); PlayerTextDrawSetShadow(playerid, wStars[playerid], 0); PlayerTextDrawBackgroundColor(playerid, wStars[playerid], 255); PlayerTextDrawFont(playerid, wStars[playerid], 0); PlayerTextDrawSetProportional(playerid, wStars[playerid], 1); wLvlStars[playerid] = CreatePlayerTextDraw(playerid, 492.801116, 99.302291, "[][][][][][]"); PlayerTextDrawLetterSize(playerid, wLvlStars[playerid], 0.309600, 2.192178); PlayerTextDrawTextSize(playerid, wLvlStars[playerid], -111.000000, 0.000000); PlayerTextDrawAlignment(playerid, wLvlStars[playerid], 1); PlayerTextDrawColor(playerid, wLvlStars[playerid], -5963521); PlayerTextDrawSetShadow(playerid, wLvlStars[playerid], 1); PlayerTextDrawBackgroundColor(playerid, wLvlStars[playerid], 255); PlayerTextDrawFont(playerid, wLvlStars[playerid], 0); PlayerTextDrawSetProportional(playerid, wLvlStars[playerid], 1); }
Код:
if(GetPVarInt(playerid,"Wanted") != pInfo[playerid][pWanted]) { new wlvl[9]; format(wlvl, 9, "%d", pInfo[playerid][pWanted]); PlayerTextDrawSetString(playerid, WLvlTD[playerid], wlvl); SetPVarInt(playerid,"Wanted", pInfo[playerid][pWanted]); new query[128], name[24]; GetPlayerName(playerid, name, 24); format(query, sizeof(query), "UPDATE `playerdata` SET `wanted` = '%d' WHERE `username` = '%s'", pInfo[playerid][pWanted], name); mysql_tquery(dbHandle, query); }