07.10.2013, 19:06
I want the job of (trucker) to do with GM cars and personal cars.
How do I can do with the GM and the personal?
if you put this function ((GetVehicleModel (carid) == 515)) I did not go to the next checkpoint
How do I can do with the GM and the personal?
PHP код:
public KamionPrehrane(carid) // vozac prehrambene robe
{
if((carid >= 298) && (carid <= 307))
{
return 1;
}
return 0;
}
PHP код:
if(CP[playerid] == 1608 && (GetVehicleModel(carid) == 515) && KamionPrehrane(carid) && IsTrailerAttachedToVehicle(carid))
{
CP[playerid] = 1609;
GameTextForPlayer(playerid, "~b~Verificarea de daune", 2000, 4);
new Float:chealth; GetVehicleHealth(GetPlayerVehicleID(playerid),chealth);
new String[120];
if (chealth <= 1000){
new cchealth[20] = "0";
format(String,sizeof(String),"Prejudiciu : %s %", cchealth);
SendClientMessage(playerid, 0x9A6735FF, string);}
if (chealth <= 980){
new cchealth[20] = "5";
format(String,sizeof(String),"Prejudiciu : %s %", cchealth);
SendClientMessage(playerid, 0x9A6735FF, string);}
if (chealth <= 930){
new cchealth[20] = "10";
format(String,sizeof(String),"Prejudiciu : %s %", cchealth);
SendClientMessage(playerid, 0x9A6735FF, string);}
if (chealth <= 880){
new cchealth[20] = "15";
format(String,sizeof(String),"Prejudiciu : %s %", cchealth);
SendClientMessage(playerid, 0x9A6735FF, string);}
if (chealth <= 830){
new cchealth[20] = "20";
format(String,sizeof(String),"Prejudiciu : %s %", cchealth);
SendClientMessage(playerid, 0x9A6735FF, string);}
if (chealth <= 780){
new cchealth[20] = "25";
format(String,sizeof(String),"Prejudiciu : %s %", cchealth);
SendClientMessage(playerid, 0x9A6735FF, string);}
if (chealth <= 730){
new cchealth[20] = "30";
format(String,sizeof(String),"Prejudiciu : %s %", cchealth);
SendClientMessage(playerid, 0x9A6735FF, string);}
if (chealth <= 680){
new cchealth[20] = "35";
format(String,sizeof(String),"Prejudiciu : %s %", cchealth);
SendClientMessage(playerid, 0x9A6735FF, string);}
if (chealth <= 630){
new cchealth[20] = "40";
format(String,sizeof(String),"Prejudiciu : %s %", cchealth);
SendClientMessage(playerid, 0x9A6735FF, string);}
if (chealth <= 580){
new cchealth[20] = "45";
format(String,sizeof(String),"Prejudiciu : %s %", cchealth);
SendClientMessage(playerid, 0x9A6735FF, string);}
if (chealth <= 530){
new cchealth[20] = "50";
format(String,sizeof(String),"Prejudiciu : %s %", cchealth);
SendClientMessage(playerid, 0x9A6735FF, string);}
if (chealth <= 480)
{
new cchealth[20] = "65";
format(String,sizeof(String),"Deteriorarea vehiculului : %s %, nu puteti efectua оncarcarea !!!", cchealth);
SendClientMessage(playerid, 0x9A6735FF, string);
SendClientMessage(playerid, 0xADADADFF, "{995031} Transport оntrerupt !!!");
SendClientMessage(playerid, 0xADADADFF, "{995031} Distrugerea nu trebuie sa fie mai mica de 50% !!!");
CP[playerid] = 0;
DisablePlayerCheckpoint(playerid);
PlayerInfo[playerid][pPrehrana] = 0;
new taj = GetVehicleTrailer(carid);
SetVehicleToRespawn(taj);}
DisablePlayerCheckpoint(playerid);
SetPlayerCheckpoint(playerid, 2950.13,-1002.37,11.83,10.0);// cp utovar robe
}