my Server have an blindflod system whith a black textdraw but pepple can see by press Tab can you help me with that
PHP Code:
new Text:BFText;
// Blindfold
BFText = TextDrawCreate(641.199951, 1.500000, "usebox");
TextDrawLetterSize(BFText, 0.000000, 49.378147);
TextDrawTextSize(BFText, -2.000000, 0.000000);
TextDrawAlignment(BFText, 3);
TextDrawColor(BFText, -1);
TextDrawUseBox(BFText, true);
TextDrawBoxColor(BFText, 255);
TextDrawSetShadow(BFText, 0);
TextDrawSetOutline(BFText, 0);
TextDrawBackgroundColor(BFText, 255);
TextDrawFont(BFText, 1);
CMD:bf(playerid, params[])
{
new string[128], giveplayerid;
if(sscanf(params, "u", giveplayerid)) return SendClientMessageEx(playerid, COLOR_GREY, "SUDUNG: /ciabitmat [player]");
if(IsPlayerConnected(giveplayerid))
{
if(PlayerInfo[playerid][pMember] == 15 || PlayerInfo[playerid][pLeader] == 15)
{
if(ProxDetectorS(6.0, playerid, giveplayerid))
{
new vehicle = GetPlayerVehicleID(playerid);
if(IsPlayerInAnyVehicle(playerid) && GetPlayerState(playerid) == 2 && IsPlayerInVehicle(giveplayerid, vehicle))
{
if(GetPVarInt(giveplayerid, "BlindFolded") == 0) {
if(giveplayerid == playerid) { SendClientMessageEx(playerid, COLOR_GREY, "Ban khong the tu bit mat."); return 1; }
format(string, sizeof(string), "%s nguoi lai xe da bit mat ban lai.", GetPlayerNameEx(playerid));
SendClientMessageEx(giveplayerid, COLOR_WHITE, string);
format(string, sizeof(string), "ban da bit mat %s.", GetPlayerNameEx(giveplayerid));
SendClientMessageEx(playerid, COLOR_WHITE, string);
format(string, sizeof(string), "*nguoi lai xe %s da~ bit mat %s.", GetPlayerNameEx(playerid), GetPlayerNameEx(giveplayerid));
ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
TextDrawShowForPlayer(giveplayerid, BFText);
//ShowPlayerNameTagForPlayer(giveplayerid, i, 0);
for(new i; i<MAX_PLAYERS; i++)
{
if(IsPlayerConnected(i))
{
ShowPlayerNameTagForPlayer(giveplayerid, i, 0);
}
}
SetPVarInt(giveplayerid, "BlindFolded", 1);
}
else {
if(giveplayerid == playerid) { SendClientMessageEx(playerid, COLOR_GREY, " Ban khong the tu coi bit mat !"); return 1; }
format(string, sizeof(string), "%s has removed the blindfold from over your eyes !", GetPlayerNameEx(playerid));
SendClientMessageEx(giveplayerid, COLOR_WHITE, string);
format(string, sizeof(string), " ** Ban da coi bit mat cho %s.", GetPlayerNameEx(giveplayerid));
SendClientMessageEx(playerid, COLOR_WHITE, string);
format(string, sizeof(string), "* %s da coi bit mat cho %s.", GetPlayerNameEx(playerid), GetPlayerNameEx(giveplayerid));
ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
TextDrawHideForPlayer(giveplayerid, BFText);
for(new i; i<MAX_PLAYERS; i++)
{
if(IsPlayerConnected(i))
{
ShowPlayerNameTagForPlayer(giveplayerid, i, 1);
}
}
DeletePVar(giveplayerid, "BlindFolded");
}
}
else
{
if(GetPVarInt(giveplayerid, "BlindFolded") == 0) {
if(giveplayerid == playerid) { SendClientMessageEx(playerid, COLOR_GREY, "Ban khong the tu bit mat."); return 1; }
format(string, sizeof(string), "%s da bit mat ban lai.", GetPlayerNameEx(playerid));
SendClientMessageEx(giveplayerid, COLOR_WHITE, string);
format(string, sizeof(string), "ban da bit mat %s.", GetPlayerNameEx(giveplayerid));
SendClientMessageEx(playerid, COLOR_WHITE, string);
for(new i; i<MAX_PLAYERS; i++)
{
if(IsPlayerConnected(i))
{
ShowPlayerNameTagForPlayer(giveplayerid, i, 0);
}
}
format(string, sizeof(string), "*%s da~ bit mat %s.", GetPlayerNameEx(playerid), GetPlayerNameEx(giveplayerid));
ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
TextDrawShowForPlayer(giveplayerid, BFText);
SetPVarInt(giveplayerid, "BlindFolded", 1);
}
else {
if(giveplayerid == playerid) { SendClientMessageEx(playerid, COLOR_GREY, " Ban khong the tu coi bit mat !"); return 1; }
format(string, sizeof(string), "%s has removed the blindfold from over your eyes !", GetPlayerNameEx(playerid));
SendClientMessageEx(giveplayerid, COLOR_WHITE, string);
format(string, sizeof(string), " ** Ban da coi bit mat cho %s.", GetPlayerNameEx(giveplayerid));
SendClientMessageEx(playerid, COLOR_WHITE, string);
format(string, sizeof(string), "* %s da coi bit mat cho %s.", GetPlayerNameEx(playerid), GetPlayerNameEx(giveplayerid));
ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
TextDrawHideForPlayer(giveplayerid, BFText);
for(new i; i<MAX_PLAYERS; i++)
{
if(IsPlayerConnected(i))
{
ShowPlayerNameTagForPlayer(giveplayerid, i, 1);
}
}
DeletePVar(giveplayerid, "BlindFolded");
}
}
}
else
{
SendClientMessageEx(playerid, COLOR_GREY, " Ban khong o gan nguoi do.");
return 1;
}
}
else
{
SendClientMessageEx(playerid, COLOR_GREY, " Ban khong duoc phep su dung lenh nay.");
return 1;
}
}
else
{
SendClientMessageEx(playerid, COLOR_GREY, "Ma Id cua nguoi choi khong hop le");
return 1;
}
return 1;
}
It is a SA-MP related function and cannot be altered. However, one solution is to set the player's camera to face a black screen (and then using