SA-MP Forums Archive
How to make a door to FBI HQ ? - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: How to make a door to FBI HQ ? (/showthread.php?tid=464041)



How to make a door to FBI HQ ? - Snitty - 15.09.2013

Guys i really need a help don't know how to make it , cause there is no door to the FBI HQ i totally need your help


Re: How to make a door to FBI HQ ? - DavidLuango - 15.09.2013

Well -.. Do these stuff.

* download a Map editor or any MTA to map yourself doors.
* If you want gates set up, make a cmd /gateopen like this
if(!strcmp(cmdtext, "/gateopen", true))
{
if(PlayerInfo[playerid][pMember] == 1 ) // Make sure you fix this up, This function asks you whom do you want to allow to open the gate. Like Let's say FBI member or LSPD member or w.e You should define your member group though.
{
if (PlayerToPoint(15.0, playerid,1589.053344,-1638.123168,14.122960))
{
MoveObject(pdgate1,1596.790039, -1638.102173, 13.882034, 2.0);
SendClientMessage(playerid, COLOR_WHITE,"Use /gateclose to close the gate.");
GetPlayerName(playerid, sendername, sizeof(sendername));
GiveNameSpace(sendername);
if(PlayerInfo[playerid][pMaskUse] == 1) { format(sendername, sizeof(sendername), "Stranger_%d", RandMask[playerid]); }
format(string, sizeof(string), "* %s takes their remote and opens a garage.", sendername);
ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPL E,COLOR_PURPLE);
}

And make a /gateclose
Almost same thing, change the cordinates.
Hope this helps, feel free to ask me if you're confused.


Re: How to make a door to FBI HQ ? - Snitty - 15.09.2013

I meant like this Door



Re: How to make a door to FBI HQ ? - DavidLuango - 15.09.2013

Quote:
Originally Posted by Snitty
Посмотреть сообщение
I meant like this Door
Just create

new createpickup;

Then

at your on gamemode iniit

Createpickup = CreatePickup(1239,1ur location cords here); the first 2 numbers are ur pickup id you can get various of those ids from here http://weedarr.wikidot.com/pickups

Then at OnCommandPlayerText

if (strcmp("/enter", cmdtext, true, 6) == 0)
{
if(IsPlayerInRangeOfPoint(playerid,10,cords here))
{
SetPlayerPos(playerid,cords here);
return 1;
}
}


then exit cmd

if (strcmp("/exit", cmdtext, true, 6) == 0)
{
if(IsPlayerInRangeOfPoint(playerid,10,3 cords))
{
SetPlayerPos(playerid,cords );
return 1;
}

}
I am sort of tired, pretty much it is basic, if you're sort of a experienced coder that should take you far.
I apologize if you didn't understand, just hit me up, when I am free I'll explain you more breifly. =]


Re: How to make a door to FBI HQ ? - Snitty - 15.09.2013

Thanks much really appreciate your help , now im starting to make it !
+REP from me !