#1

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 
iPlayer)
          {
            if(
IsPlayerInRangeOfPoint(i500, -1083.90002441,4289.70019531,7.59999990))
              {
                
SendClientMessageEx(iCOLOR_YELLOW"Guard say: Attention lock down go to your cell now!");
            }
            
SetTimer("ClosePrisonCell"95000); 
Reply
#2

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 
iPlayer)
    {
        
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).
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)