MySQL question
#1

Uh, I want to make a storage system inside my druglab but my question is.. how do I get the information from the druglab that the player is in? This is my code

PHP код:
else if(!strcmp(params"info"))
    {
        for(new 
0MAX_DLABSi++)
        {
            if(
IsPlayerInRangeOfPoint(playerid60.0DrugLabs[i][ExitX], DrugLabs[i][ExitY], DrugLabs[i][ExitZ]))
            {
                
format(stringsizeof(string), ""COL_ORANGE"DROGURI:\n__________\n"string);
                
format(stringsizeof(string), "%sHeroina: %d\n"stringDrugLabs[i][Heroina]);
                
format(stringsizeof(string), "%sHeroina: %d\n"stringDrugLabs[i][Heroina]);
            }
        }
    } 
The coords will be right because, if we think logic, it will go through all the druglabs and put the coords there, and if the player is in range of one of them it will work, but how does the system know that the player is inside druglab 3 so it will return the stock of the druglab with id 3?

Didn't tested yet but probably in the code above it will return the information from all druglabs.
Reply


Messages In This Thread
MySQL question - by AndreiWow - 10.02.2017, 08:53
Re: MySQL question - by Misiur - 10.02.2017, 08:58
Re: MySQL question - by BroZeus - 10.02.2017, 09:01

Forum Jump:


Users browsing this thread: 1 Guest(s)