WhyBaby
Новичок
Привет ребята , я сделал систему анти+с и сделал так чтобы появлялся текстдрав по середине экрана , чтобы человек не +сшил, но этот текстдрав не появляется
вот код!
И вот паблики
почему не показывает текст драв?
вот код!
if(PRESSED(KEY_FIRE | KEY_CROUCH))
{
new weapon = GetPlayerWeapon(playerid);
if(weapon == 24)
{
ArataAnti(playerid);
SetPVarInt(playerid, "LoadingAnti", 1);
TogglePlayerControllable(playerid, 0);
SetTimerEx("SafeLoadAnti", 2000, 0, "d", playerid);
}
}
{
new weapon = GetPlayerWeapon(playerid);
if(weapon == 24)
{
ArataAnti(playerid);
SetPVarInt(playerid, "LoadingAnti", 1);
TogglePlayerControllable(playerid, 0);
SetTimerEx("SafeLoadAnti", 2000, 0, "d", playerid);
}
}
new playerid;
AntiCbug[playerid][0] = CreatePlayerTextDraw(playerid, 256.470581, 228.083328, "LD_SPAC:white");
PlayerTextDrawLetterSize(playerid, AntiCbug[playerid][0], 0.000000, 0.000000);
PlayerTextDrawTextSize(playerid, AntiCbug[playerid][0], 131.764709, 29.749984);
PlayerTextDrawAlignment(playerid, AntiCbug[playerid][0], 1);
PlayerTextDrawColor(playerid, AntiCbug[playerid][0], -5963521);
PlayerTextDrawSetShadow(playerid, AntiCbug[playerid][0], 0);
PlayerTextDrawSetOutline(playerid, AntiCbug[playerid][0], 0);
PlayerTextDrawFont(playerid, AntiCbug[playerid][0], 4);
AntiCbug[playerid][1] = CreatePlayerTextDraw(playerid, 258.823516, 231.000000, "LD_SPAC:white");
PlayerTextDrawLetterSize(playerid, AntiCbug[playerid][1], 0.000000, 0.000000);
PlayerTextDrawTextSize(playerid, AntiCbug[playerid][1], 126.588226, 24.500000);
PlayerTextDrawAlignment(playerid, AntiCbug[playerid][1], 1);
PlayerTextDrawColor(playerid, AntiCbug[playerid][1], -1523963137);
PlayerTextDrawSetShadow(playerid, AntiCbug[playerid][1], 0);
PlayerTextDrawSetOutline(playerid, AntiCbug[playerid][1], 0);
PlayerTextDrawFont(playerid, AntiCbug[playerid][1], 4);
AntiCbug[playerid][2] = CreatePlayerTextDraw(playerid, 279.058746, 234.500015, "Anti +C Bug");
PlayerTextDrawLetterSize(playerid, AntiCbug[playerid][2], 0.449999, 1.600000);
PlayerTextDrawAlignment(playerid, AntiCbug[playerid][2], 1);
PlayerTextDrawColor(playerid, AntiCbug[playerid][2], -5963521);
PlayerTextDrawSetShadow(playerid, AntiCbug[playerid][2], 0);
PlayerTextDrawSetOutline(playerid, AntiCbug[playerid][2], 0);
PlayerTextDrawBackgroundColor(playerid, AntiCbug[playerid][2], 51);
PlayerTextDrawFont(playerid, AntiCbug[playerid][2], 1);
PlayerTextDrawSetProportional(playerid, AntiCbug[playerid][2], 1);
AntiCbug[playerid][3] = CreatePlayerTextDraw(playerid, 254.588333, 224.583389, "LD_CHAT:badchat");
PlayerTextDrawLetterSize(playerid, AntiCbug[playerid][3], 0.000000, 0.000000);
PlayerTextDrawTextSize(playerid, AntiCbug[playerid][3], 8.941162, 14.583343);
PlayerTextDrawAlignment(playerid, AntiCbug[playerid][3], 1);
PlayerTextDrawColor(playerid, AntiCbug[playerid][3], -1);
PlayerTextDrawSetShadow(playerid, AntiCbug[playerid][3], 0);
PlayerTextDrawSetOutline(playerid, AntiCbug[playerid][3], 0);
PlayerTextDrawFont(playerid, AntiCbug[playerid][3], 4);
AntiCbug[playerid][0] = CreatePlayerTextDraw(playerid, 256.470581, 228.083328, "LD_SPAC:white");
PlayerTextDrawLetterSize(playerid, AntiCbug[playerid][0], 0.000000, 0.000000);
PlayerTextDrawTextSize(playerid, AntiCbug[playerid][0], 131.764709, 29.749984);
PlayerTextDrawAlignment(playerid, AntiCbug[playerid][0], 1);
PlayerTextDrawColor(playerid, AntiCbug[playerid][0], -5963521);
PlayerTextDrawSetShadow(playerid, AntiCbug[playerid][0], 0);
PlayerTextDrawSetOutline(playerid, AntiCbug[playerid][0], 0);
PlayerTextDrawFont(playerid, AntiCbug[playerid][0], 4);
AntiCbug[playerid][1] = CreatePlayerTextDraw(playerid, 258.823516, 231.000000, "LD_SPAC:white");
PlayerTextDrawLetterSize(playerid, AntiCbug[playerid][1], 0.000000, 0.000000);
PlayerTextDrawTextSize(playerid, AntiCbug[playerid][1], 126.588226, 24.500000);
PlayerTextDrawAlignment(playerid, AntiCbug[playerid][1], 1);
PlayerTextDrawColor(playerid, AntiCbug[playerid][1], -1523963137);
PlayerTextDrawSetShadow(playerid, AntiCbug[playerid][1], 0);
PlayerTextDrawSetOutline(playerid, AntiCbug[playerid][1], 0);
PlayerTextDrawFont(playerid, AntiCbug[playerid][1], 4);
AntiCbug[playerid][2] = CreatePlayerTextDraw(playerid, 279.058746, 234.500015, "Anti +C Bug");
PlayerTextDrawLetterSize(playerid, AntiCbug[playerid][2], 0.449999, 1.600000);
PlayerTextDrawAlignment(playerid, AntiCbug[playerid][2], 1);
PlayerTextDrawColor(playerid, AntiCbug[playerid][2], -5963521);
PlayerTextDrawSetShadow(playerid, AntiCbug[playerid][2], 0);
PlayerTextDrawSetOutline(playerid, AntiCbug[playerid][2], 0);
PlayerTextDrawBackgroundColor(playerid, AntiCbug[playerid][2], 51);
PlayerTextDrawFont(playerid, AntiCbug[playerid][2], 1);
PlayerTextDrawSetProportional(playerid, AntiCbug[playerid][2], 1);
AntiCbug[playerid][3] = CreatePlayerTextDraw(playerid, 254.588333, 224.583389, "LD_CHAT:badchat");
PlayerTextDrawLetterSize(playerid, AntiCbug[playerid][3], 0.000000, 0.000000);
PlayerTextDrawTextSize(playerid, AntiCbug[playerid][3], 8.941162, 14.583343);
PlayerTextDrawAlignment(playerid, AntiCbug[playerid][3], 1);
PlayerTextDrawColor(playerid, AntiCbug[playerid][3], -1);
PlayerTextDrawSetShadow(playerid, AntiCbug[playerid][3], 0);
PlayerTextDrawSetOutline(playerid, AntiCbug[playerid][3], 0);
PlayerTextDrawFont(playerid, AntiCbug[playerid][3], 4);
И вот паблики
Код:
forward SafeLoadAnti(playerid);
public SafeLoadAnti(playerid)
{
if(GetPVarInt(playerid, "LoadingAnti") == 1)
{
SetPVarInt(playerid, "LoadingAnti", 0);
PlayerTextDrawHide(playerid, AntiCbug[playerid][0]);
PlayerTextDrawHide(playerid, AntiCbug[playerid][1]);
PlayerTextDrawHide(playerid, AntiCbug[playerid][2]);
PlayerTextDrawHide(playerid, AntiCbug[playerid][3]);
TogglePlayerControllable(playerid, 1);
}
}
forward ArataAnti(playerid);
public ArataAnti(playerid)
{
PlayerTextDrawShow(playerid, AntiCbug[playerid][0]);
PlayerTextDrawShow(playerid, AntiCbug[playerid][1]);
PlayerTextDrawShow(playerid, AntiCbug[playerid][2]);
PlayerTextDrawShow(playerid, AntiCbug[playerid][3]);
}
