Problem with ProxDetectorS
#2

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

        if(
IsPlayerConnected(playerid))
        {
            for(new 
i = 0; i < MAX_PLAYERS; i ++)
            if(
PlayerInfo[i][pHelper] >= 2 || PlayerInfo[i][pAdmin] >= 1)
            {
                
tmp = strtok(cmdtext, idx);
                    if(!
strlen(tmp))
                    {
                        
SendClientMessage(playerid, COLOR_GRAD2, "{00A1FF}USAGE{FFFFFF}: /eventskin (1-4)");
                        return 
1;
                    }
                new 
nrs = strval(tmp);
                
format(string, sizeof(string), "Admin %s has changed skin to everyone in 30 meters.", sendername);
                
ProxDetector(30.0, playerid, string, COLOR_LIGHTRED,COLOR_LIGHTRED,COLOR_LIGHTRED,COLOR_LIGHTRED,COLOR_LIGHTRED);
                {
                    if(
IsPlayerConnected(i) || ProxDetectorS(30.0, i,i))
                    {
                        {
                        if(
nrs == 1)
                        {
                        
SetPlayerSkin(i, 31);
                        
SetPlayerColor(i, COLOR_GOLD);
                        }
                        if(
nrs == 2)
                        {
                        
SetPlayerSkin(i, 32);
                        
SetPlayerColor(i, 0xFF40BFAA);
                        }
                        if(
nrs == 3)
                        {
                        
SetPlayerSkin(i, 33);
                        
SetPlayerColor(i, 0xBFFF00AA);
                        }
                        if(
nrs == 4)
                        {
                        
SetPlayerSkin(i, 34);
                        
SetPlayerColor(i, 0xFF8000AA);
                        }
                        if(
nrs < 1 || nrs > 4)
                        {
                            
SendClientMessage(playerid, COLOR_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: