OnPlayerUpdate SendClientMessage GameTextForPlayer - 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: OnPlayerUpdate SendClientMessage GameTextForPlayer (
/showthread.php?tid=136163)
OnPlayerUpdate SendClientMessage GameTextForPlayer -
cozza123456 - 23.03.2010
Hi, i have this script:
public OnPlayerUpdate(playerid)
{
if(IsPlayerInRangeOfPoint(playerid, 10, -2464.9296875,1522.9167480469,27.570457458496))
{
SendClientMessage(playerid, 0x99FF66AA, "Use /lift to bring the lift up and /lift to take it back down");
GameTextForPlayer(playerid, "/lift to bring the lift up and /lift to take it back down", 5000, 5);
}
return 1;
}
But how do i make it so that it only sends it once, not spamming me?
Re: OnPlayerUpdate SendClientMessage GameTextForPlayer -
cozza123456 - 23.03.2010
Sorry for hypocritical bump but this is needed desperately!
Re: OnPlayerUpdate SendClientMessage GameTextForPlayer -
Correlli - 23.03.2010
It's better if you search for a script which has functions like OnPlayerEnterArea / OnPlayerExitArea. That would be more useful in this case.
Re: OnPlayerUpdate SendClientMessage GameTextForPlayer -
Niixie - 23.03.2010
You used OnPlayerUpdate, thats a callback thats runned a hell many times in a second.
Use a timer insted that doesnt repeat itself, unless the line SetTimer(Ex) is runned again
Re: OnPlayerUpdate SendClientMessage GameTextForPlayer -
cozza123456 - 23.03.2010
i used seifs thing but i cant make it work:
Код:
AREA_lift=AddAreaCheck(-2455.066894, -2475.107421, 1530.183959, 1518.064697);
Код:
OnPlayerEnterArea(playerid,areaid) {
if (areaid==AREA_lift)
{
SendClientMessage(playerid, 0x99FF66AA, "Use /lift to bring the lift up and /lift to take it back down");
GameTextForPlayer(playerid, "/lift to bring the lift up and /lift to take it back down", 5000, 5);
}
return 1;
}
OnPlayerLeaveArea(playerid,areaid) {
if (areaid==AREA_lift)
{
SendClientMessage(playerid, 0x99FF66AA, "Thanks for using the lift!");
GameTextForPlayer(playerid, "Thanks for using the lift!", 5000, 5);
}
return 1;
}
Re: OnPlayerUpdate SendClientMessage GameTextForPlayer -
cozza123456 - 24.03.2010
BUMP!