Problem with ProxDetectorS
#2

PHP код:
if(strcmp(cmd"/eventskin"true) == 0)
    {
        
GetPlayerName(playeridsendernamesizeof(sendername));

        if(
IsPlayerConnected(playerid))
        {
            for(new 
0MAX_PLAYERS++)
            if(
PlayerInfo[i][pHelper] >= || PlayerInfo[i][pAdmin] >= 1)
            {
                
tmp strtok(cmdtextidx);
                    if(!
strlen(tmp))
                    {
                        
SendClientMessage(playeridCOLOR_GRAD2"{00A1FF}USAGE{FFFFFF}: /eventskin (1-4)");
                        return 
1;
                    }
                new 
nrs strval(tmp);
                
format(stringsizeof(string), "Admin %s has changed skin to everyone in 30 meters."sendername);
                
ProxDetector(30.0playeridstringCOLOR_LIGHTRED,COLOR_LIGHTRED,COLOR_LIGHTRED,COLOR_LIGHTRED,COLOR_LIGHTRED);
                {
                    if(
IsPlayerConnected(i) || ProxDetectorS(30.0i,i))
                    {
                        {
                        if(
nrs == 1)
                        {
                        
SetPlayerSkin(i31);
                        
SetPlayerColor(iCOLOR_GOLD);
                        }
                        if(
nrs == 2)
                        {
                        
SetPlayerSkin(i32);
                        
SetPlayerColor(i0xFF40BFAA);
                        }
                        if(
nrs == 3)
                        {
                        
SetPlayerSkin(i33);
                        
SetPlayerColor(i0xBFFF00AA);
                        }
                        if(
nrs == 4)
                        {
                        
SetPlayerSkin(i34);
                        
SetPlayerColor(i0xFF8000AA);
                        }
                        if(
nrs || nrs 4)
                        {
                            
SendClientMessage(playeridCOLOR_GRAD2"Numarul trebuie sa fie intre 1 si 4.");
                            return 
1;
                        }
                        }
                    }
                }
            }
        }
        return 
1;
    } 
Try with it, also show your ProxDetectorS function
Reply


Messages In This Thread
Problem with ProxDetectorS - by AlexuTzVs - 13.12.2015, 01:54
Re: Problem with ProxDetectorS - by SoFahim - 13.12.2015, 03:11
Re: Problem with ProxDetectorS - by AlexuTzVs - 13.12.2015, 08:42

Forum Jump:


Users browsing this thread: 1 Guest(s)