Can someone actually help? - 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: Can someone actually help? (
/showthread.php?tid=120698)
Can someone actually help? -
jameskmonger - 12.01.2010
Well, I posted in the script request topic, but people seem to prefer to help people with 1-5 posts, instead of even replying to my post.
So, here is what I posted in Script Request:
Quote:
Can someone make me a script that, if the player is at least 300m away from BlueBerry (BlueBerry includes the fields.) it sends a gametext that says "3..." then 1 second later says "2..." then 1 second later says "1..." and then you die.
Thanks,
James.
|
Re: Can someone actually help? -
Niixie - 12.01.2010
Its kinda easy.
Make a zone there, visable or invisable doesnt matter. then you tell the server if(!PlayerIsInArea(blabla); then the timer OutOfBlueBerryOne starts and when that runs out number 2 starts and so on?
Re: Can someone actually help? -
SiJ - 12.01.2010
Quote:
Originally Posted by jameskmonger
Well, I posted in the script request topic, but people seem to prefer to help people with 1-5 posts, instead of even replying to my post.
So, here is what I posted in Script Request:
Quote:
Can someone make me a script that, if the player is at least 300m away from BlueBerry (BlueBerry includes the fields.) it sends a gametext that says "3..." then 1 second later says "2..." then 1 second later says "1..." and then you die.
Thanks,
James.
|
|
pawn Код:
//OnGameModeInit
SetTimer("AreaCheck",5000,1);
//
forward AreaCheck();
public AreaCheck()
{
new MsgSent[MAX_PLAYERS] = 0;
for(new i=0; i<MAX_PLAYERS;i++)
{
if(IsPlayerInRangeOfPoint(i,300.0,<BlueBerry x>,<BlueBerry y>,<BlueBerry z>)
{
if(MsgSent[i] == 0)
{
GameTextForPlayer(i,"3",1000,3);
MsgSend[i] = 1;
SetTimerEx("MsgUnsent",60000,0,"d",i);
SetTimerEx("Number2",1000,0,"d",i);
}
}
forward Number2(id);
public Number2(id)
{
GameTextForPlayer(id,"2",1000,3);
SetTimerEx("Number1",1000,0,"d",i);
}
forward Number1(id);
public Number1(id)
{
GameTextForPlayer(id,"1",1000,3);
SetPlayerHealth(id,0);
}
Hope it works

Untested (I've made this code right in this page so it's unintended.. :P)
Re: Can someone actually help? -
jameskmonger - 12.01.2010
Quote:
Originally Posted by SiJ
Quote:
Originally Posted by jameskmonger
Well, I posted in the script request topic, but people seem to prefer to help people with 1-5 posts, instead of even replying to my post.
So, here is what I posted in Script Request:
Quote:
Can someone make me a script that, if the player is at least 300m away from BlueBerry (BlueBerry includes the fields.) it sends a gametext that says "3..." then 1 second later says "2..." then 1 second later says "1..." and then you die.
Thanks,
James.
|
|
pawn Код:
//OnGameModeInit SetTimer("AreaCheck",5000,1); // forward AreaCheck(); public AreaCheck() { new MsgSent[MAX_PLAYERS] = 0; for(new i=0; i<MAX_PLAYERS;i++) { if(IsPlayerInRangeOfPoint(i,300.0,<BlueBerry x>,<BlueBerry y>,<BlueBerry z>) { if(MsgSent[i] == 0) { GameTextForPlayer(i,"3",1000,3); MsgSend[i] = 1; SetTimerEx("MsgUnsent",60000,0,"d",i); SetTimerEx("Number2",1000,0,"d",i); } }
forward Number2(id); public Number2(id) { GameTextForPlayer(id,"2",1000,3); SetTimerEx("Number1",1000,0,"d",i); }
forward Number1(id); public Number1(id) { GameTextForPlayer(id,"1",1000,3); SetPlayerHealth(id,0); }
Hope it works  Untested (I've made this code right in this page so it's unintended.. :P)
|
Cause I'm lazy, could you find the coords for Blueberry? (The town + the fields.)