Different functions - Same command
#1

Introduction: Command 'carica' for job (ID: 3).

Request: I would to add others functions for others jobs by using the same command.

PHP код:
CMD:carica(playerid,params[])
{
        new 
Float:soPos[3];
        new 
vehicleid GetNearestVehicle(playerid);
        new 
string[135];
        
GetVehiclePos(vehicleidsoPos[0], soPos[1], soPos[2]);
        if(
camionjob[playerid] == 200)return SendClientMessage(playerid,COLOR_DARKRED,"Il camion и pieno. Vai a scaricare prima di continuare");
        {
            if(
playerVariables[playerid][pJob] == 3)
            {
                if(
vehicleVariables[vehicleid][vVehicleJob] == 3)
                {
                    if(
IsPlayerAttachedObjectSlotUsed(playerid,0)) RemovePlayerAttachedObject(playerid0);
                    
format(string,sizeof(string),"* %s carica la cassa sul retro del camion.",PlayerName(playerid));
                    
nearByMessage(playerid,COLOR_PURPLE,string);
                    
ClearAnimations(playerid);
                    
carico[playerid] = 0;
                    
camionjob[playerid] += 50;
                }
                else 
SendClientMessage(playerid,COLOR_DARKRED,"Devi andare vicino il tuo camion per caricare il materiale.");
            }
            else 
SendClientMessage(playerid,COLOR_DARKRED,"Non sei un autotrasportatore.");
        }
        return 
1;

Reply


Messages In This Thread
Different functions - Same command - by fabriziobondi - 05.02.2012, 19:37
Re: Different functions - Same command - by Mosslah - 05.02.2012, 21:22
Re: Different functions - Same command - by 2KY - 05.02.2012, 21:25

Forum Jump:


Users browsing this thread: 1 Guest(s)