SA-MP Forums

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

Reply
 
Thread Tools Display Modes
Old 15/10/2019, 02:32 PM   #1
PopularTech
Little Clucker
 
PopularTech's Avatar
 
Join Date: Dec 2018
Posts: 23
Reputation: 0
Default I need help with a /blindfold command!

Hello i am Jason and im working in this script and i want to make a cmd with /blindfold and /unblindfold for example.
When you type that cmd its supposed to get the selected player's screen black to where he cant see anything except the normal GTA HUD and the chat, but i dont know how to make it. can you please help me? Oh and this cmd will be used for roleplay not as an admin cmd.
__________________
𝕰𝖝𝖙𝖗𝖊𝖒𝖊 𝕽𝖔𝖑𝖊𝖕𝖑𝖆𝖞
Our Community Extreme Roleplay is based in the City of Los Santos. After several tries and a lot of stress we managed to get everything running and now our only goal is to build a big and succesful community where you guys can have fun roleplaying. We would appreciate if you would join this adventure with us! https://discord.gg/WqsWPsJ

PopularTech is offline   Reply With Quote
Old 15/10/2019, 02:55 PM   #2
IzadorO
Big Clucker
 
IzadorO's Avatar
 
Join Date: Feb 2015
Location: Scotland, Glasgow
Posts: 164
Reputation: 11
Default Re: I need help with a /blindfold command!

You will need to freeze the player when blindfolded and then show a textdraw which would be a black box over the whole screen with most cases. Simply create the textdraw or find one online, which is black and covers the whole screen. Remove/apply the textdraw with /blindfold and /unblindfold.

https://wiki.sa-mp.com/wiki/TextDrawCreate

https://wiki.sa-mp.com/wiki/CreatePlayerTextDraw

You can find a textdraw editor under the filterscripts tab, this is one of them:

https://forum.sa-mp.com/showthread.p...light=Textdraw
IzadorO is offline   Reply With Quote
Old 15/10/2019, 07:24 PM   #3
PopularTech
Little Clucker
 
PopularTech's Avatar
 
Join Date: Dec 2018
Posts: 23
Reputation: 0
Default Re: I need help with a /blindfold command!

Thank you a lot! +REP
__________________
𝕰𝖝𝖙𝖗𝖊𝖒𝖊 𝕽𝖔𝖑𝖊𝖕𝖑𝖆𝖞
Our Community Extreme Roleplay is based in the City of Los Santos. After several tries and a lot of stress we managed to get everything running and now our only goal is to build a big and succesful community where you guys can have fun roleplaying. We would appreciate if you would join this adventure with us! https://discord.gg/WqsWPsJ

PopularTech is offline   Reply With Quote
Old 15/10/2019, 08:27 PM   #4
Escobabe
Huge Clucker
 
Escobabe's Avatar
 
Join Date: Apr 2017
Location: Valhalla
Posts: 278
Reputation: 70
Default Re: I need help with a /blindfold command!

Or the easier version, freeze the player, SetPlayerCameraPos to a dark place and for the /unblindfold just SetCameraBehindPlayer.
__________________

Los Santos Underground
Soon...
Escobabe is offline   Reply With Quote
Old 16/10/2019, 03:28 PM   #5
PopularTech
Little Clucker
 
PopularTech's Avatar
 
Join Date: Dec 2018
Posts: 23
Reputation: 0
Default Re: I need help with a /blindfold command!

Both of theese are cool ideas but they seem impossible for me to do alone. Thanks a lot ill find someone to help me now
__________________
𝕰𝖝𝖙𝖗𝖊𝖒𝖊 𝕽𝖔𝖑𝖊𝖕𝖑𝖆𝖞
Our Community Extreme Roleplay is based in the City of Los Santos. After several tries and a lot of stress we managed to get everything running and now our only goal is to build a big and succesful community where you guys can have fun roleplaying. We would appreciate if you would join this adventure with us! https://discord.gg/WqsWPsJ

PopularTech is offline   Reply With Quote
Old 16/10/2019, 03:41 PM   #6
DomagojSellug
Huge Clucker
 
DomagojSellug's Avatar
 
Join Date: Sep 2016
Location: Croatia
Posts: 215
Reputation: 22
Default Re: I need help with a /blindfold command!

Quote:
Originally Posted by PopularTech View Post
Both of theese are cool ideas but they seem impossible for me to do alone. Thanks a lot ill find someone to help me now
They are not really impossible. This is the simpler solution with the camera position set:

pawn Code:
new blindfolded[MAX_PLAYERS];

CMD:blindfold(playerid, params[])
{
    new id;
    if(sscanf(params, "u", id)) return 0; // if you did not enter an ID the command won't work, instead of return you can put your own error message or something
    if(blindfolded[id] == 1) // if the target is blindfolded
    {
        SetCameraBehindPlayer(id); // camera resets
        TogglePlayerControllable(id, 1); // player can move again
        blindfolded[id] = 0;
    }
    else
    {
        blindfolded[id] = 1;
        SetCameraPos(id, 0,0,0); // you can add your own coordinates instead of 0,0,0
        TogglePlayerControllable(id, 0); // player is frozen
    }
}
__________________
My work:


Weapon Shop FS
Click on me!
DomagojSellug is offline   Reply With Quote
Old 17/10/2019, 01:46 PM   #7
PopularTech
Little Clucker
 
PopularTech's Avatar
 
Join Date: Dec 2018
Posts: 23
Reputation: 0
Default Re: I need help with a /blindfold command!

Thanks a lot dude it really helped me a lot! But how to fix this lol

Quote:
gamemode-jason.pwn(57046) : error 017: undefined symbol "SetCameraPos"
__________________
𝕰𝖝𝖙𝖗𝖊𝖒𝖊 𝕽𝖔𝖑𝖊𝖕𝖑𝖆𝖞
Our Community Extreme Roleplay is based in the City of Los Santos. After several tries and a lot of stress we managed to get everything running and now our only goal is to build a big and succesful community where you guys can have fun roleplaying. We would appreciate if you would join this adventure with us! https://discord.gg/WqsWPsJ

PopularTech is offline   Reply With Quote
Old 17/10/2019, 06:55 PM   #8
SiaReyes
Huge Clucker
 
SiaReyes's Avatar
 
Join Date: Mar 2019
Location: Coordinates X,Y,Z
Posts: 328
Reputation: 22
Default Re: I need help with a /blindfold command!

Quote:
Originally Posted by PopularTech View Post
Thanks a lot dude it really helped me a lot! But how to fix this lol
https://wiki.sa-mp.com/wiki/SetPlayerCameraPos
https://wiki.sa-mp.com/wiki/SetPlayerCameraLookAt
__________________
Offshowtime Fuck It!

Quote:
Originally Posted by Toroi View Post
blackmail people that join your server using their ip address as hostage

or get a job and play sa-mp for fun
SiaReyes 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] Blindfold (useful for screenshots!) TheToretto Filterscripts 10 10/11/2018 08:17 AM
Help with YCMD proces command and problem with "Server:Unknown command JoDe Scripting Help 1 20/04/2018 01:12 PM
Blindfold system huydollar Scripting Help 3 29/06/2014 08:02 AM
i had this command in my gamemode, when i type this in game,it tells server unknow command? Chrisli520 Scripting Help 3 24/11/2013 11:02 AM
/blindfold Pujan2008 Help Archive 35 11/04/2009 05:28 PM


All times are GMT. The time now is 10:43 PM.


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