/repair help
#1

I have this /repair command
PHP код:
if(strcmp(cmd"/repair"true) == 0)
    {
        if(
IsPlayerConnected(playerid))
        {
            if(
PlayerInfo[playerid][pJob] != 7)
            {
                
SendClientMessage(playeridCOLOR_GREY"Nu esti Mecanic sau nu faci parte din Need For Speed!");
                return 
1;
            }
            
tmp strtok(cmdtextidx);
            if(!
strlen(tmp))
            {
                
SendClientMessage(playeridCOLOR_GRAD2"USAGE: /repair [playerid/PartOfName] [price]");
                return 
1;
            }
            new 
playa;
            new 
money;
            
playa ReturnUser(tmp);
            
tmp strtok(cmdtextidx);
            
money strval(tmp);
            if(
money || money 2000) { SendClientMessage(playeridCOLOR_GREY"   Price not lower then 1, or above 2000!"); return 1; }
            if(
IsPlayerConnected(playa))
            {
                if(
playa != INVALID_PLAYER_ID)
                {
                    if(
ProxDetectorS(8.0playeridplaya)&& IsPlayerInAnyVehicle(playa))
                    {
                        if(
playa == playerid) { SendClientMessage(playeridCOLOR_GREY"   Can't do that!"); return 1; }
                        
GetPlayerName(playagiveplayersizeof(giveplayer));
                        
GetPlayerName(playeridsendernamesizeof(sendername));
                        
format(stringsizeof(string), "* You offerd %s to fix his car for $%d .",giveplayer,money);
                        
SendClientMessage(playeridCOLOR_LIGHTBLUEstring);
                        
format(stringsizeof(string), "* Car Mechanic %s wants to repair your car for $%d, (type /accept repair) to accept.",sendername,money);
                        
SendClientMessage(playaCOLOR_LIGHTBLUEstring);
                        
RepairOffer[playa] = playerid;
                        
RepairPrice[playa] = money;
                    }
                    else
                    {
                        
SendClientMessage(playeridCOLOR_GREY"   That player is not near you / not in a car.");
                    }
                }
            }
            else
            {
                
SendClientMessage(playeridCOLOR_GREY"   That player is offline.");
            }
        }
        return 
1;
    } 
I don't know how to edit this command to make it work for faction with ID 16

....

i have tryied with
PHP код:
 if(PlayerInfo[playerid][pJob] != || PlayerInfo[playerid][pMember] != 16)
            {
                
SendClientMessage(playeridCOLOR_GREY"Nu esti Mecanic sau nu faci parte din Need For Speed!");
                return 
1;
            } 
but nothing

Thankyou
Reply


Messages In This Thread
/repair help - by CaTaLinU - 01.01.2012, 23:38
Respuesta: /repair help - by [Nikk] - 02.01.2012, 02:47
Re: /repair help - by Ballu Miaa - 02.01.2012, 03:35
Re: /repair help - by RuSke - 02.01.2012, 07:14

Forum Jump:


Users browsing this thread: 1 Guest(s)