Different functions - Same command
#3

Like this?

pawn Код:
CMD:carica(playerid,params[])
{
        new Float:soPos[3];
        new vehicleid = GetNearestVehicle(playerid);
        new string[135];
        GetVehiclePos(vehicleid, soPos[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(playerid, 0);
                    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 if(playerVariables[playerid][pJob] == 4) //CHANGE THIS TO YOUR OTHER ID.
            {
                //effect if their Job ID is 4.
            }
            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: 2 Guest(s)