need help with command - 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: need help with command (
/showthread.php?tid=181597)
need help with command -
LegendNissanGTR - 06.10.2010
how do i make a command that when you do /pay on the checkpoint and it will take away like 2000 cash and the gate will open please help
Re: need help with command -
Jeffry - 06.10.2010
pawn Код:
if(!strcmp("/pay",cmdtext))
{
if(IsPlayerInRangeOfPoint(playerid, 7.0, YourX, YourY, YourZ)) //7.0 is the range
{
GivePlayerMoney(playerid, -2000);
SendClientMessage(playerid,0xFFFFFFFF,"Gate opening!");
//MoveObject...
}
return 1;
}
Re: need help with command -
LegendNissanGTR - 07.10.2010
Then how about the taking away thier money? and nice signature
Re: need help with command -
Retardedwolf - 07.10.2010
pawn Код:
GivePlayerMoney(playerid, -2000);
Takes away their 2k. btw if you do this without a check it will go negative.
Re: need help with command -
Jeffry - 07.10.2010
Could as well be with the check:
pawn Код:
if(!strcmp("/pay",cmdtext))
{
if(IsPlayerInRangeOfPoint(playerid, 7.0, YourX, YourY, YourZ)) //7.0 is the range
{
if(GetPlayerMoney(playerid)>2000)
{
GivePlayerMoney(playerid, -2000);
SendClientMessage(playerid,0xFFFFFFFF,"Gate opening!");
//MoveObject...
return 1;
}
else return SendClientMessage(playerid, 0xFF0000FF, "ERROR: You need 2000$ to open the gate!");
}
else return SendClientMessage(playerid, 0xFF0000FF, "ERROR: You need to be near the gate to open it!");
}
Just pick the one you want, and don't forget to fill in your coords. ^^
Re: need help with command -
LegendNissanGTR - 07.10.2010
Thanks mate
Re: need help with command -
LegendNissanGTR - 07.10.2010
and can you make a signature almost like yours JEFFRY just the name change to mine and the women change to more prettier girl please if you can do it
Re: need help with command -
Jeffry - 07.10.2010
I didn't made the signature, a friend made it. Sorry. :P
Re: need help with command -
LegendNissanGTR - 08.10.2010
Could you ask him to make for me
Re: need help with command -
Jeffry - 08.10.2010
Quote:
Originally Posted by LegendNissanGTR
Could you ask him to make for me 
|
Sorry, but I dont want to annoy him with requests of anyone. If it start it once, everybody asks me to ask him. Sry.