[Help] I need help with the script
#2

i really don't understand what you want, but here is an improved verison of your script:
PHP код:
CMD:ffind(playeridparams[]){
    if(
PlayerInfo[playerid][pDuty] == || !IsACop(playerid)) return SendClientMessageEx(playeridCOLOR_GRAD2"Ban khong phai la nhan vien nha nuoc.");
    {
        
SendClientMessageEx(playeridCOLOR_RED"* Listing all gates within 5 meters of you...");
        new 
string[128], szMessage[32], Float:fGatePos[3];
        for(new 
iMAX_GATESi++){
            
GetDynamicObjectPos(GateInfo[i][gGATE], fGatePos[0], fGatePos[1], fGatePos[2]);
            if(
IsPlayerInRangeOfPoint(playerid5fGatePos[0], fGatePos[1], fGatePos[2]))
            {
                if(
GateInfo[i][gModel] != 0)
                {
                    
format(szMessagesizeof(szMessage), "Gate ID %d (VW: %d)"iGateInfo[i][gVW]);
                    
SendClientMessageEx(playeridCOLOR_WHITEszMessage);
                    
format(string,sizeof(string),"|___________ Password Gate (ID: %d) ___________|"i);
                
SendClientMessageEx(playeridCOLOR_WHITEstring);
                    
format(stringsizeof(string), "PassWord Gate: %s"GateInfo[i][gPass]);
                    
SendClientMessageEx(playeridCOLOR_WHITEstring);
                }
            }
        }
    }
    return 
1;

i removed that gateid think. your command dosen't require sscanf. i also created the variabiles string[128], szMessage[32], Float:fGatePos[3] before the loop, it didn't make any sense defining them repeatedly
Reply


Messages In This Thread
[Help] I need help with the script - by BanhVo - 06.10.2018, 08:30
Re: [Help] I need help with the script - by Vennox - 06.10.2018, 09:39
Re: [Help] I need help with the script - by BanhVo - 06.10.2018, 10:03
Re: [Help] I need help with the script - by Undef1ned - 06.10.2018, 17:51

Forum Jump:


Users browsing this thread: 2 Guest(s)