05.02.2012, 19:37
(
Последний раз редактировалось fabriziobondi; 05.02.2012 в 19:40.
Причина: Updated format.
)
Introduction: Command 'carica' for job (ID: 3).
Request: I would to add others functions for others jobs by using the same command.
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(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 SendClientMessage(playerid,COLOR_DARKRED,"Non sei un autotrasportatore.");
}
return 1;
}