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)
+--- Thread: Help? (
/showthread.php?tid=599548)
Help? -
N0FeaR - 27.01.2016
The problem is the message won't show up, what might be the problem?
PHP код:
if(buttonid == cellclose)
{
if(!IsACop(playerid))
{
SendClientMessageEx(playerid,COLOR_GREY,"Access denied.");
return 1;
}
foreach(new i: Player)
{
if(IsPlayerInRangeOfPoint(i, 500, -1083.90002441,4289.70019531,7.59999990))
{
SendClientMessageEx(i, COLOR_YELLOW, "Guard say: Attention lock down go to your cell now!");
}
SetTimer("ClosePrisonCell", 9500, 0);
Re: Help? -
Mencent - 27.01.2016
Hi!
I added two rows to check if you in range.
PHP код:
if(buttonid == cellclose)
{
if(!IsACop(playerid))
{
SendClientMessageEx(playerid,COLOR_GREY,"Acces denied.");
return 1;
}
foreach(new i: Player)
{
printf("InRange: %i",IsPlayerInRangeOfPoint(i,500,-1083.90002441,4289.70019531,7.59999990));
if(IsPlayerInRangeOfPoint(i,500,-1083.90002441,4289.70019531,7.59999990))
{
printf("InRange: Yes");
SendClientMessageEx(i,COLOR_YELLOW,"Guard say: Attention lock down go to your cell now!");
}
}
SetTimer("ClosePrisonCell",9500,0);
}
Please test this Code and Show us what will print in the Server console (Server.log).