SA-MP Forums

Go Back   SA-MP Forums > SA-MP Scripting and Plugins > Scripting Help

Reply
 
Thread Tools Display Modes
Old 28/06/2014, 02:13 AM   #1
huydollar
Little Clucker
 
Join Date: Jun 2013
Posts: 47
Reputation: 0
Question Blindfold system

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.1999511.500000"usebox");
    
TextDrawLetterSize(BFText0.00000049.378147);
    
TextDrawTextSize(BFText, -2.0000000.000000);
    
TextDrawAlignment(BFText3);
    
TextDrawColor(BFText, -1);
    
TextDrawUseBox(BFTexttrue);
    
TextDrawBoxColor(BFText255);
    
TextDrawSetShadow(BFText0);
    
TextDrawSetOutline(BFText0);
    
TextDrawBackgroundColor(BFText255);
    
TextDrawFont(BFText1);
CMD:bf(playeridparams[])
{
    new 
string[128], giveplayerid;
    if(
sscanf(params"u"giveplayerid)) return SendClientMessageEx(playeridCOLOR_GREY"SUDUNG: /ciabitmat [player]");

    if(
IsPlayerConnected(giveplayerid))
    {
        if(
PlayerInfo[playerid][pMember] == 15 || PlayerInfo[playerid][pLeader] == 15)
        {
            if(
ProxDetectorS(6.0playeridgiveplayerid))
            {
                new 
vehicle GetPlayerVehicleID(playerid);
                if(
IsPlayerInAnyVehicle(playerid) && GetPlayerState(playerid) == && IsPlayerInVehicle(giveplayeridvehicle))
                {
                    if(
GetPVarInt(giveplayerid"BlindFolded") == 0) {
                        if(
giveplayerid == playerid) { SendClientMessageEx(playeridCOLOR_GREY"Ban khong the tu bit mat."); return 1; }
                          
format(stringsizeof(string), "%s nguoi lai xe da bit mat ban lai."GetPlayerNameEx(playerid));
                        
SendClientMessageEx(giveplayeridCOLOR_WHITEstring);
                        
format(stringsizeof(string), "ban da bit mat %s."GetPlayerNameEx(giveplayerid));
                        
SendClientMessageEx(playeridCOLOR_WHITEstring);
                        
format(stringsizeof(string), "*nguoi lai xe %s da~ bit mat %s."GetPlayerNameEx(playerid), GetPlayerNameEx(giveplayerid));
                        
ProxDetector(30.0playeridstringCOLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
                        
TextDrawShowForPlayer(giveplayeridBFText);
                        
//ShowPlayerNameTagForPlayer(giveplayerid, i, 0);
                        
for(new ii<MAX_PLAYERSi++)
                        {
                            if(
IsPlayerConnected(i))
                               {
                                
ShowPlayerNameTagForPlayer(giveplayeridi0);
                            }
                        }
                        
SetPVarInt(giveplayerid"BlindFolded"1);
                    }
                     else {
                        if(
giveplayerid == playerid) { SendClientMessageEx(playeridCOLOR_GREY" Ban khong the tu coi bit mat !"); return 1; }
                          
format(stringsizeof(string), "%s has removed the blindfold from over your eyes !"GetPlayerNameEx(playerid));
                        
SendClientMessageEx(giveplayeridCOLOR_WHITEstring);
                        
format(stringsizeof(string), " ** Ban da coi bit mat cho %s."GetPlayerNameEx(giveplayerid));
                        
SendClientMessageEx(playeridCOLOR_WHITEstring);
                        
format(stringsizeof(string), "* %s da coi bit mat cho %s."GetPlayerNameEx(playerid), GetPlayerNameEx(giveplayerid));
                        
ProxDetector(30.0playeridstringCOLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
                        
TextDrawHideForPlayer(giveplayeridBFText);
                        for(new 
ii<MAX_PLAYERSi++)
                        {
                            if(
IsPlayerConnected(i))
                               {
                                
ShowPlayerNameTagForPlayer(giveplayeridi1);
                            }
                        }
                        
DeletePVar(giveplayerid"BlindFolded");
                    }
                }
                else
                {
                    if(
GetPVarInt(giveplayerid"BlindFolded") == 0) {
                        if(
giveplayerid == playerid) { SendClientMessageEx(playeridCOLOR_GREY"Ban khong the tu bit mat."); return 1; }
                          
format(stringsizeof(string), "%s da bit mat ban lai."GetPlayerNameEx(playerid));
                        
SendClientMessageEx(giveplayeridCOLOR_WHITEstring);
                        
format(stringsizeof(string), "ban da bit mat %s."GetPlayerNameEx(giveplayerid));
                        
SendClientMessageEx(playeridCOLOR_WHITEstring);
                        for(new 
ii<MAX_PLAYERSi++)
                        {
                            if(
IsPlayerConnected(i))
                               {
                                
ShowPlayerNameTagForPlayer(giveplayeridi0);
                            }
                        }
                        
format(stringsizeof(string), "*%s da~ bit mat %s."GetPlayerNameEx(playerid), GetPlayerNameEx(giveplayerid));
                        
ProxDetector(30.0playeridstringCOLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
                        
TextDrawShowForPlayer(giveplayeridBFText);
                        
SetPVarInt(giveplayerid"BlindFolded"1);
                    }
                     else {
                        if(
giveplayerid == playerid) { SendClientMessageEx(playeridCOLOR_GREY" Ban khong the tu coi bit mat !"); return 1; }
                          
format(stringsizeof(string), "%s has removed the blindfold from over your eyes !"GetPlayerNameEx(playerid));
                        
SendClientMessageEx(giveplayeridCOLOR_WHITEstring);
                        
format(stringsizeof(string), " ** Ban da coi bit mat cho %s."GetPlayerNameEx(giveplayerid));
                        
SendClientMessageEx(playeridCOLOR_WHITEstring);
                        
format(stringsizeof(string), "* %s da coi bit mat cho %s."GetPlayerNameEx(playerid), GetPlayerNameEx(giveplayerid));
                        
ProxDetector(30.0playeridstringCOLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
                        
TextDrawHideForPlayer(giveplayeridBFText);
                        for(new 
ii<MAX_PLAYERSi++)
                        {
                            if(
IsPlayerConnected(i))
                               {
                                
ShowPlayerNameTagForPlayer(giveplayeridi1);
                            }
                        }
                        
DeletePVar(giveplayerid"BlindFolded");
                    }
                }
            }
            else
            {
                
SendClientMessageEx(playeridCOLOR_GREY" Ban khong o gan nguoi do.");
                return 
1;
            }
        }
        else
        {
            
SendClientMessageEx(playeridCOLOR_GREY" Ban khong duoc phep su dung lenh nay.");
            return 
1;
        }
    }
    else
    {
        
SendClientMessageEx(playeridCOLOR_GREY"Ma Id cua nguoi choi khong hop le");
        return 
1;
    }
    return 
1;

Sorry for my bad at English
huydollar is offline   Reply With Quote
Old 28/06/2014, 02:44 AM   #2
Vanter
Huge Clucker
 
Vanter's Avatar
 
Join Date: Jul 2013
Posts: 391
Reputation: 16
Default Re: Blindfold system

it is samp related, you cant change it
Vanter is offline   Reply With Quote
Old 28/06/2014, 05:00 AM   #3
Emmet_
Guest
 
Posts: n/a
Default Re: Blindfold system

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 SetCameraBehindPlayer when removing the blindfold):

pawn Code:
SetPlayerCameraPos(targetid, -833.5241, -1358.8575, 86.9054);
SetPlayerCameraLookAt(targetid, -833.5241, -1358.8575, 0.0000);
  Reply With Quote
Old 29/06/2014, 08:02 AM   #4
huydollar
Little Clucker
 
Join Date: Jun 2013
Posts: 47
Reputation: 0
Default Re: Blindfold system

Thanks very much
huydollar is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
[FilterScript] NRank System V1.0 | Advanced Rank System | 5+ Commands | Dialog System [Much More] Nirzor Filterscripts 9 18/04/2014 10:49 PM
[FilterScript] Cross Admin System V1.2 [updated] + Added IRC System + Anti Cheat(sscanf, dcmd,y_ini) No.1 Admin System CROSS_Hunter Filterscripts 21 02/01/2013 07:32 PM
[FilterScript] Cross Admin System V1.1 [updated] + Added V.I.P System(sscanf, dcmd,y_ini) No.1 Admin System CROSS_Hunter Filterscripts 8 10/09/2012 12:18 PM
/blindfold Pujan2008 Help Archive 35 11/04/2009 05:28 PM


All times are GMT. The time now is 01:04 PM.


Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.