SA-MP Forums Archive
Gates - 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)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Gates (/showthread.php?tid=77861)



Gates - Magneeto - 15.05.2009

How can i make gates for like factions and gangs? please i need help on this




Thank you


Re: Gates - Derksen123 - 15.05.2009

//--------------------------------------[GATE]------------------------------------------------------
if (strcmp(cmdtext, "/COMMANDCLOSE", true)==0)
{
MoveObject (COMMAND,-380.886,-3110.380,(10).912,2.5);
return 1; X Y Z HOW fast THE LAST 1E
}
if (strcmp(cmdtext, "/COMMANDOPEN", true)==0) if you look at the code you see a different with the first 1e and the second 1e
{ at the first 1e at Z code you see (10)
MoveObject (COMMAND,-380.886,-3110.380,(3).912,2.5); at the second 1e at Z code you see (3) i changed it , when you type /commandopen it
return 1; SAME WITH HERE goes down if you make that command lower as the standard code it goes down like (4)
} if you make the standard code higher like (12) it goes up but the saved position
is always the standard go see at ongamemodeinit that i put in the reply (--->)
command the standard code from this code what you see left = 10

AT ongamemode init that is the standard code
Command= CreateObject(1508, -415.287292, -3124.881592,---> 10.045923, 0.0000, 0.0000, 78.7500);

and at new ( new COMMAND




Re: Gates - MenaceX^ - 15.05.2009

Quote:
Originally Posted by Derksen123
//--------------------------------------[GATE]------------------------------------------------------
if (strcmp(cmdtext, "/COMMANDCLOSE", true)==0)
{
MoveObject (COMMAND,-380.886,-3110.380,(10).912,2.5);
return 1; X Y Z HOW fast THE LAST 1E
}
if (strcmp(cmdtext, "/COMMANDOPEN", true)==0) if you look at the code you see a different with the first 1e and the second 1e
{ at the first 1e at Z code you see (10)
MoveObject (COMMAND,-380.886,-3110.380,(3).912,2.5); at the second 1e at Z code you see (3) i changed it , when you type /commandopen it
return 1; SAME WITH HERE goes down if you make that command lower as the standard code it goes down like (4)
} if you make the standard code higher like (12) it goes up but the saved position
is always the standard go see at ongamemodeinit that i put in the reply (--->)
command the standard code from this code what you see left = 10

AT ongamemode init that is the standard code
Command= CreateObject(1508, -415.287292, -3124.881592,---> 10.045923, 0.0000, 0.0000, 78.7500);

and at new ( new COMMAND

Uh? What are you doing?..



Do you have any variables to assign the gate to a faction?
You could do it with mysql scripting, making a table and fill it up, but if you don't know. You can just make a command and assign the gate to a faction, as far as you have factions.


Re: Gates - Magneeto - 15.05.2009

Where do i place it?


Re: Gates - Magneeto - 15.05.2009

And how do i make it like LSPD gate only lspd members can open it
And on..


Re: Gates - Correlli - 15.05.2009

Quote:
Originally Posted by Magneeto
And how do i make it like LSPD gate only lspd members can open it
And on..
Make a check if player is LSPD member.


Re: Gates - Magneeto - 15.05.2009

How....

Thank you


Re: Gates - Correlli - 15.05.2009

Use if statement.


Re: Gates - Magneeto - 15.05.2009

Can you do it?


Im still learning how to script sorry




Thank you


Re: Gates - Correlli - 15.05.2009

pawn Код:
if(IsPlayerLSPD_Or_Whatever[playerid] == 1)
{
// your code
}
I don't know what do you use, IsPlayerLSPD or anything like that.