/blindfold
#1

Hey where can I find or where can I do command /blindfold

it makes the player see nothing but black, in car only and if he's not cuffed, he can do /removeblindfold to see again


Please help I searched, no luck
Reply
#2

Maybe its a stupid solution but i cant think of something else and i dont see anyone else answering u.
Try just SetPlayerCameraPos to a black place.. lol
Reply
#3

Use a big textdraw box, look my afk filterscript for an example.
Reply
#4

lol yom, i thought of your script too when i saw this post.
I use my own AFK script but i remember i saw the screens u posted.
I could only think on the camera pos thing.. lol it could work too but its stupid.. damn
Reply
#5

Code:
if(strcmp(cmd, "/blindfold", true) == 0)
	{
	  SetPlayerInterior(playerid, 10);
	  return 1;
  	}
This should do the trick, It wont allow the player to see anything. Although The other player can see him.

You could add a /drag command to drag the player.
Reply
#6

But interior is not black, its kinda gray, and u can see other players only not the objects/floor/sky...
I dont think it'll look so good considering its supposed to be a blindfold.
Reply
#7

Quote:
Originally Posted by MidoBan
But interior is not black, its kinda gray, and u can see other players only not the objects/floor/sky...
I dont think it'll look so good considering its supposed to be a blindfold.
Ohh yes, You can see other players.

But, Still its better cuz he wont see the surroundings just the player who blindfolded him.

Quote:

Off topic: On our server we used to have bus rides for these "BLIND" people who apparently jumped in the hole of caligulas. These people were able to see/enter the SF garage which was really freaky/new at that time.

Reply
#8

Quote:
Originally Posted by Swayam
But, Still its better cuz he wont see the surroundings just the player who blindfolded him.
It isn't, he wont see only the player who blindfolded him, he'll see all the players.
yom's solution is the best one here..
Reply
#9

go LS Beach, if u go on a certain depth, the land will be ... well ... u can fall through, then u spawn near chilliad, but, if u take a jetpack and u go a bit under the fake land and do a /save there is all black... problem solved with CameraPos !
Reply
#10

Set their camera position into the tunnel.
Reply
#11

Код:
SetPlayerCameraPos(playerid, -833.5241,-1358.8575,86.9054);
SetPlayerCameraLookAt(playerid, -830.8118,-1360.3612,87.0289);
Result:
Reply
#12

Nevermind
Reply
#13

Quote:
Originally Posted by Carlos_Costello
How do you set it to go back to normal?
SetCameraBehindPlayer(playerid);
Reply
#14

This is quite an amazing idea for a good role-play server
Wish LS-RP could add it in
Reply
#15

I put together this command below (Using some of the info from this post) and I have a problem.
When I use it on another player, it always blind folds myself.
How can I make it blind fold the player I want it to?
thx in advance

Код:
//--------------------[BlindFold]------------------------------------------------------------------------
  if(strcmp(cmd, "/blindfold", true) == 0)
  {
    if(IsPlayerConnected(playerid))

	tmp = strtok(cmdtext, idx);
	if(!strlen(tmp))
	  {
		SendClientMessage(playerid, COLOR_GRAD1, "USAGE: //blindfold [player name]");
		return 1;
        }
    SetPlayerCameraPos(playerid, -833.5241,-1358.8575,86.9054);
    SetPlayerCameraLookAt(playerid, -830.8118,-1360.3612,87.0289);
    return 1;
    }

  if(strcmp(cmd, "/unblindfold", true) == 0)
  {
	 if(IsPlayerConnected(playerid))

	 tmp = strtok(cmdtext, idx);
     if(!strlen(tmp))
	 {
         SendClientMessage(playerid, COLOR_GRAD1, "USAGE: //unblindfold [player name]");
		 return 1;
         }
  SetCameraBehindPlayer(playerid);
  return 1;
 }
Same Thing (Just Quoted)
Quote:

//--------------------[BlindFold]------------------------------------------------------------------------
if(strcmp(cmd, "/blindfold", true) == 0)
{
if(IsPlayerConnected(playerid))

tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_GRAD1, "USAGE: //blindfold [player name]");
return 1;
}
SetPlayerCameraPos(playerid, -833.5241,-1358.8575,86.9054);
SetPlayerCameraLookAt(playerid, -830.8118,-1360.3612,87.0289);
return 1;
}

if(strcmp(cmd, "/unblindfold", true) == 0)
{
if(IsPlayerConnected(playerid))

tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_GRAD1, "USAGE: //unblindfold [player name]");
return 1;
}
SetCameraBehindPlayer(playerid);
return 1;
}

Reply
#16

because you have it set for yourself, have to add a strtok (or equal) so that someone can put /blindfold [id]
Reply
#17

Quote:
Originally Posted by Saorp
Код:
//--------------------[BlindFold]------------------------------------------------------------------------
  if(strcmp(cmd, "/blindfold", true) == 0)
  {
    if(IsPlayerConnected(playerid))

	tmp = strtok(cmdtext, idx);
	if(!strlen(tmp))
	  {
		SendClientMessage(playerid, COLOR_GRAD1, "USAGE: //blindfold [player name]");
		return 1;
        }
    SetPlayerCameraPos(playerid, -833.5241,-1358.8575,86.9054);
    SetPlayerCameraLookAt(playerid, -830.8118,-1360.3612,87.0289);
    return 1;
    }

  if(strcmp(cmd, "/unblindfold", true) == 0)
  {
	 if(IsPlayerConnected(playerid))

	 tmp = strtok(cmdtext, idx);
    if(!strlen(tmp))
	 {
        SendClientMessage(playerid, COLOR_GRAD1, "USAGE: //unblindfold [player name]");
		 return 1;
        }
  SetCameraBehindPlayer(playerid);
  return 1;
 }
Firstly, you are performing an unnecessary check, seeing if playerid is connected. If he/she just typed a command, of course they are connected. Secondly, your check doesn't act how you would like. If you do not place braces after the 'if()', it will only take the first single statement: "tmp = strtok(cmdtext, idx);"

Try this:
[pawn]
// Using
pawn Код:
tags!

if(strcmp(cmd, "/blindfold", true) == 0) // '/blindfold'
{
  tmp = strtok(cmdtext, idx); // Making 'tmp' hold the id. Remains as a string.
  if(!strlen(tmp)) // If the length of 'tmp' is 0:
    return SendClientMessage(playerid, COLOR_GRAD1, "USAGE: /blindfold [player id]"); // Send the message AND end the command here (thus avoiding the 'SERVER: Unknown command.' message).
  new id = strval(tmp); // New integer which holds the value of 'tmp'. EG: /blindfold 6. 'id' would become 6.
  if(IsPlayerConnected(id)) // If the id is connected:
  { // We are using more than a single statement, so we use braces.
    SetPlayerCameraPos(id, -833.5241,-1358.8575,86.9054); // Setting the camera position for 'id'.
    return SetPlayerCameraLookAt(id, -830.8118,-1360.3612,87.0289); // Setting the camera to look at X for 'id' AND end the command here (thus avoiding the 'SERVER: Unknown command.' message).
  } // Closing brace for the id check.
}

if(strcmp(cmd, "/unblindfold", true) == 0) // '/unblindfold'
{
  tmp = strtok(cmdtext, idx); // Making 'tmp' hold the id. Remains as a string.
  if(!strlen(tmp)) // If the length of 'tmp' is 0:
    return SendClientMessage(playerid, COLOR_GRAD1, "USAGE: /unblindfold [player id]"); // Send the message AND end the command here (thus avoiding the 'SERVER: Unknown command.' message).
  new id = strval(tmp); // New integer which holds the value of 'tmp'. EG: /blindfold 6. 'id' would become 6.
  if(IsPlayerConnected(id)) // If the id is connected:
    return SetCameraBehindPlayer(id); // Set the camera of 'id' behind them, as well as ending the command.
  return 1; // If the id was not connected, add an else statement here. This will just stop the 'SERVER: Unknown command.' message.
 }
This will work, and if you are still wanting names to work (EG: /blindfold Cueball), head on over to the Useful Functions topic (search for it), and then search for a name checker (EG: GetPlayerID() ). Then simply assign 'id' to the function:
pawn Код:
new id = GetPlayerID(tmp);
This should do the trick

~Cueball~
Reply
#18

Don't forget to add proxy/admin restrictions if on a RP server to reduce oddity and abuse (try adding a limiter of some sort i.e. timer)
Reply
#19

If it's a RP server, make it like the /tie command. You can only tie if your the driver, and a family member.

would decrease a lot of abuse.
Reply
#20

Thanks Cueball, I'm new to scripting (If you didnt notice) and you descriptions really help alot.

Unfortunately the search is still down, so I can't figure out where to put the code below.
pawn Код:
new id = GetPlayerID(tmp);


Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)