Quantcast
Channel: SA-MP Forums
Viewing all articles
Browse latest Browse all 18226

OnPlayerPickUpDyanmicPickup

$
0
0
The messages are being spammed for every dynamic pickup in the server.

What am I doing wrong?

PHP Code:

public OnPlayerPickUpDynamicPickup(playeridpickupid)
{
    for(new 
0sizeof(Tolls); t++)
    {
         if(
pickupid == Tolls[t][fPickup] || Tolls[t][sPickup]) //if(IsPlayerInRangeOfPoint(i, 4, Tolls[t][tX], Tolls[t][tY], Tolls[t][tZ]))
           
{
             if(
Tolls[t][tStatus] == 1)
               {
                 
ProxDetector(20.0playerid"Toll guard says: Sorry, the tolls aren't available right now."COLOR_FADE1COLOR_FADE2COLOR_FADE3COLOR_FADE4COLOR_FADE5);
            }
            else
            {
                   if(
Player[playerid][CopDuty])
                  {
                    
ProxDetector(20.0playerid"Toll guard says: Hello officer, would you like to pass?"COLOR_FADE1COLOR_FADE2COLOR_FADE3COLOR_FADE4COLOR_FADE5);
                    
SendClientMessage(playeridCOLOR_GOLD"Use \"/opentolls\" to open the toll.");
                }
                else
                {
                    
ProxDetector(20.0playerid"Toll guard says: Hello, the toll is $50 to go through."COLOR_FADE1COLOR_FADE2COLOR_FADE3COLOR_FADE4COLOR_FADE5);
                    
SendClientMessage(playeridCOLOR_GOLD"Use \"/opentolls\" to open the toll.");
                }
            }
        }
    }
    return 
1;



Viewing all articles
Browse latest Browse all 18226

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>