Problem
#1

Hey guys. My friend made dynamic GPS system for me but there is one problem. It will update list of locations only when i restart server.
PHP код:
CMD:creategps(playeridparams[])
{
    if (
PlayerInfo[playerid][Admin] < 5)
    {
        
ERROR(playerid"You are not authorized!");
        return 
1;
    }
    if (
sscanf(params"s[40]"params[0]))
    {
        
KORISTI(playerid"/creategps [Name]");
        return 
1;
    }
    if (
strlen(params[0]) < 3)
    {
        
ERROR(playerid"3 characters minimum!");
        return 
1;
    }
    new 
Free_GPSID Iter_Free(i_GPSLocations);
    if (
Free_GPSID MAX_GPS_LOCATIONS)
    {
         
ERROR(playerid"Not more than 20 locations");
        return 
1;
    }
    new 
FloatpXFloatpYFloatpZ;
    
GetPlayerPos(playeridpXpYpZ);
    
format(GPSData[Free_GPSID][gpsName], 40"%s"params[0]);
    
GPSData[Free_GPSID][gpsXPos] = pX;
    
GPSData[Free_GPSID][gpsYPos] = pY;
    
GPSData[Free_GPSID][gpsZPos] = pZ;
    
GPSData[Free_GPSID][gpsExist] = 1;
    
SachuvajGps(Free_GPSID);
    new 
x_string[50];
       
format(x_stringsizeof(x_string), "You've create gps ID: %d"Free_GPSID);
       
SCM(playerid, -1x_string);
    return 
1;

There is command for creating it. If you need anything else tell me
Reply


Messages In This Thread
Problem - by Micko123 - 01.09.2016, 06:53
Re: Problem - by Micko123 - 01.09.2016, 07:24
Re: Problem - by Sjn - 01.09.2016, 07:28
Re: Problem - by Micko123 - 01.09.2016, 07:30
Re: Problem - by Sjn - 01.09.2016, 07:34
Re: Problem - by Micko123 - 01.09.2016, 07:37
Re: Problem - by Sjn - 01.09.2016, 07:40
Re: Problem - by Threshold - 01.09.2016, 07:40
Re: Problem - by JaydenJason - 01.09.2016, 07:41
Re: Problem - by Micko123 - 01.09.2016, 07:46

Forum Jump:


Users browsing this thread: 1 Guest(s)