[HELP]About 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: [HELP]About gates! (
/showthread.php?tid=159728)
[HELP]About gates! -
GBLTeam - 14.07.2010
I know to create gate in pawno but i dont know how to create gate who will take money like;
when i type /toll gate to open and i to loose -50$
Re: [HELP]About gates! -
DeathOnaStick - 14.07.2010
Alright.
- Whats exactly your problem? What do you want to do?
- Did you script something yet?
- Got any coord's or other useful information?
Re: [HELP]About gates! -
oliverrud - 14.07.2010
Just do on the command for when he types /toll make it GivePlayerMoney(playerid,-50);
Together with all the other code.
Re: [HELP]About gates! -
DeathOnaStick - 14.07.2010
Quote:
Originally Posted by oliverrud
Just do on the command for when he types /toll make it GivePlayerMoney(playerid,-50);
Together with all the other code.
|
Depends if he wants it to be called with some special things, like when he is just in a certain area, etc.
Re: [HELP]About gates! -
oliverrud - 14.07.2010
Just add : IsPlayerInRangeOfPoint
Re: [HELP]About gates! -
[DK]JaloNik - 14.07.2010
He's asking about HOW you make a gate, it shall could open on that /toll gate cmd, and should take 50 dollars from you when you use it.. - I would etll you if I did know how to.. xD
Re: [HELP]About gates! -
Pghpunkid - 14.07.2010
To make gates, you need to store the variables. something like
pawn Код:
new gate;
public OnGameModeInit()
{
gate = CreateObject(988, 0.0, 1.1, 10.859, 0.0, 0.0, -90.0); // Gate
return 1;
}
public OnPlayerCommandText(playerid,cmdtext)
{
if (!strcmp(cmdtext,"/open",true))
{
MoveObject(gate, 0.0, 6.1, 10.859, 4.0);
return 1;
}
if (!strcmp(cmdtext,"/close",true))
{
MoveObject(gate, 0.0, 1.1, 10.859, 4.0);
return 1;
}
return 0;
}
That makes a basic command driven gate. To make a ranged gate, you need timers checking IsPlayerInRangeOfPoint to open and close, and of course, take the 50$ to open it.