How will i make... - 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: How will i make... (
/showthread.php?tid=126137)
How will i make... -
MaykoX - 07.02.2010
If player comes to some point text shows for him ?
Quote:
if(strcmp(cmdtext, "/statue", true) == 0)
{
if(PlayerToPoint(50, playerid, 2100.6714,1611.2051,10.8203))
{
GivePlayerMoney(playerid, 1000);
SendClientMessage(playerid,COLOR_ORANGE,"This is statue of old MFD Head Owner Gunner. ");
SendClientMessage(playerid,COLOR_ORANGE,"Please get on your knees and be quiet for 1 minute.");
SendClientMessage(playerid,COLOR_ORANGE,"Gunner was a good Leader/Owner, He will visit us once per month ");
return 1;
}
|
Re: How will i make... -
Correlli - 07.02.2010
You could use a timer.
Re: How will i make... -
mansonh - 07.02.2010
Are you asking what the code means?
Basically when a player is near this statue thing or whatever it is and type "/statue" it will send him those messages and give him $1000.
edit--
Oh you want it to be automatic.
Well you can use a timer with area check for all players.
If you want a simple way to do that I have an area check system script, see sig.
Then you can do
pawn Код:
new statuearea = CreateHiddenCPSphere(2100.6714,1611.2051,10.8203,50);
public OnPlayerEnterHiddenCheckPoint(playerid, hcpid)
{
if(hcpid==statuearea)
{
GivePlayerMoney(playerid, 1000);
SendClientMessage(playerid,COLOR_ORANGE,"This is statue of old MFD Head Owner Gunner. ");
SendClientMessage(playerid,COLOR_ORANGE,"Please get on your knees and be quiet for 1 minute.");
SendClientMessage(playerid,COLOR_ORANGE,"Gunner was a good Leader/Owner, He will visit us once per month Cheesy");
return 1;
}
}
Infact, your script says to sit quietly for one minute, my area check system allows you to track if a player is moving or not.
So you could only give them the money if they stop moving for 1 minute.
If you want to use it an have trouble let me know.
Re: How will i make... -
MaykoX - 07.02.2010
Quote:
|
Originally Posted by mansonh
Are you asking what the code means?
Basically when a player is near this statue thing or whatever it is and type "/statue" it will send him those messages and give him $1000.
edit--
Oh you want it to be automatic.
Well you can use a timer with area check for all players.
If you want a simple way to do that I have an area check system script, see sig.
Then you can do
pawn Код:
new statuearea = CreateHiddenCPSphere(2100.6714,1611.2051,10.8203,50);
public OnPlayerEnterHiddenCheckPoint(playerid, hcpid) { if(hcpid==statuearea) { GivePlayerMoney(playerid, 1000); SendClientMessage(playerid,COLOR_ORANGE,"This is statue of old MFD Head Owner Gunner. "); SendClientMessage(playerid,COLOR_ORANGE,"Please get on your knees and be quiet for 1 minute."); SendClientMessage(playerid,COLOR_ORANGE,"Gunner was a good Leader/Owner, He will visit us once per month Cheesy"); return 1; } }
Infact, your script says to sit quietly for one minute, my area check system allows you to track if a player is moving or not.
So you could only give them the money if they stop moving for 1 minute.
If you want to use it an have trouble let me know.
|
Ty for this it works i edited a litle and it's perfect ty