script help
#2

Try below code.
PHP код:
CMD:fr(playerid,params[]){
    if(
PlayerInfo[playerid][pLogged]==false) {
        
SendClientMessage(playerid,COLOR_RED,LanguageText[93]);
        return 
1;
    }
    if(
PlayerInfo[playerid][pAdmin]<CmdsOptions[fr]) {
        
SendClientMessage(playerid,COLOR_RED,LanguageText[13]);
        return 
1;
    }    
    if(
ServerInfo[fr]==0) {
        
CommandDisabled(playerid);
        return 
1;
    }
    if(
gClass[playerid]!=Spy) {
        
SendClientMessage(playerid,COLOR_RED,LanguageText[115]);
        return 
1;
    }
    foreach(
Player,i) {
        if(
IsPlayerInRangeOfPoint(playerid,2.0,Bodyx[i],Bodyy[i],Bodyz[i])) {
            if(
gTeam[i] == TEAM_UnitedState) {
                
SetPlayerSkin(playerid,285);
                
SetPlayerColor(playerid,TEAM_UnitedState_COLOUR);
            } else if(
gTeam[i] == TEAM_Daesh) {
                
SetPlayerSkin(playerid,247); 
                
SetPlayerColor(playerid,TEAM_Daesh_COLOUR);
            } else if(
gTeam[i] == TEAM_Iraq) {
                
SetPlayerSkin(playerid,73);
                
SetPlayerColor(playerid,TEAM_Iraq_COLOUR);
            } else if(
gTeam[i] == TEAM_Unitedkingdom){
                
SetPlayerSkin(playerid,287);
                
SetPlayerColor(playerid,TEAM_UnitedKingdom_COLOUR);
            } else if(
gTeam[i] == TEAM_Russian) {
                
SetPlayerSkin(playerid,100);
                
SetPlayerColor(playerid,TEAM_Russian_COLOUR);
            } else if(
gTeam[i] == TEAM_Iran) {    
                
SetPlayerSkin(playerid,46);                
                
SetPlayerColor(playerid,TEAM_Iran_COLOUR);
            } else if(
gTeam[i] == TEAM_China) {
                
SetPlayerSkin(playerid,164);
                
SetPlayerColor(playerid,TEAM_China_COLOUR);
            }
              return 
1;
        } else {
            
SendClientMessage(playerid,COLOR_RED,LanguageText[117]);        
        }
    }
    return 
1;

Reply


Messages In This Thread
script help - by GeneralAref - 05.02.2016, 12:18
Re: script help - by Prokill911 - 05.02.2016, 14:37
Re: script help - by GeneralAref - 05.02.2016, 15:30

Forum Jump:


Users browsing this thread: 1 Guest(s)