PHP код:
CMD:misia(playerid, params[])
{
if(IsPlayerConnected(playerid))
{
if(PlayerInfo[playerid][Job] != 18 && PlayerInfo[playerid][Job] != 7) return FormatPlayerInfoBox(playerid,"~g~Misia Info","~w~Pouze pro: Farmarov a Kamionistov!",3000);
else if(VRServer[playerid][MissionID] != 9999) return FormatPlayerInfoBox(playerid,"~g~Misia Info","~w~ Uћ plnнљ nejakou misi ! Pouћi: /missionoff pro vypnutн mise !",3000);
else if(GetPlayerVehicleID(playerid) == 0) return FormatPlayerInfoBox(playerid,"~g~Info","~w~Misia Nie si vo vozidle.",3000);
else if((PlayerInfo[playerid][Job] == 18) && (GetVehicleModel(GetPlayerVehicleID(playerid)) != 532)) return FormatPlayerInfoBox(playerid,"~g~Misia Info","~w~Nie si v Konbajne.",3000);
else if((PlayerInfo[playerid][Job] == 7) && (GetVehicleModel(GetPlayerVehicleID(playerid)) != 514) && (GetVehicleModel(GetPlayerVehicleID(playerid)) != 515)) return FormatPlayerInfoBox(playerid,"~g~Info","~w~Nie si v Kamione",3000);
else
{
DisablePlayerCheckpoint(playerid);
if(PlayerInfo[playerid][Job] == 7)
{
VRServer[playerid][MissionID]=7;
VRServer[playerid][MissionInfo]=0;
if(IsTrailerAttachedToVehicle(GetPlayerVehicleID(playerid)))
{
switch(random(9))
{
case 0: SetPlayerCheckpoint(playerid,1007.1722,-1743.6180,13.5459,15);
case 1: SetPlayerCheckpoint(playerid,-90.9609,-1169.5758,2.1723,15);
case 2: SetPlayerCheckpoint(playerid,1380.2943,456.9404,19.6797,15);
case 3: SetPlayerCheckpoint(playerid,2352.1377,-1337.8579,23.7761,15);
case 4: SetPlayerCheckpoint(playerid,1848.6504,-2403.8574,13.3173,15);
case 5: SetPlayerCheckpoint(playerid,1944.8840,-1772.5952,13.1521,15);
case 6: SetPlayerCheckpoint(playerid,1004.3183,-932.8453,42.1797,15);
case 7: SetPlayerCheckpoint(playerid,315.7915,-162.0369,1.5781,15);
case 8: SetPlayerCheckpoint(playerid,659.1002,-565.2003,16.3359,15);
}
FormatPlayerInfoBox(playerid,"~g~Misia Info","~w~Prave jsi zahajil plneni mise, v techto misich budes ~y~rozvazet palivo~w~ do benzinovych stanic, pumpu mas oznacenou na mape ~r~cervenou barvou",3000);
}
else
{
VRServer[playerid][MissionID]=9999;
VRServer[playerid][MissionInfo]=9999;
FormatPlayerInfoBox(playerid,"~g~Misia Info","Nemas prives, tym padom sa misia ukoncila",3000);
}
}
}
}
return 1;
}
public OnPlayerEnterCheckpoint(playerid)
{
if(!IsPlayerNPC(playerid))
{
if(IsPlayerConnected(playerid))
{
if(VRServer[playerid][MissionID] == 7)
{
if(GetPlayerVehicleID(playerid) > 0)
{
if(GetVehicleModel(GetPlayerVehicleID(playerid)) == 514)
{
FormatPlayerInfoBox(playerid, "~g~Misia", "~w~Pokracuj.", 2000);
PlayerInfo[playerid][Premie]+=5000;
DisablePlayerRaceCheckpoint(playerid);
switch(random(9))
{
case 0: SetPlayerCheckpoint(playerid,1007.1722,-1743.6180,13.5459,15);
case 1: SetPlayerCheckpoint(playerid,-90.9609,-1169.5758,2.1723,15);
case 2: SetPlayerCheckpoint(playerid,1380.2943,456.9404,19.6797,15);
case 3: SetPlayerCheckpoint(playerid,2352.1377,-1337.8579,23.7761,15);
case 4: SetPlayerCheckpoint(playerid,1848.6504,-2403.8574,13.3173,15);
case 5: SetPlayerCheckpoint(playerid,1944.8840,-1772.5952,13.1521,15);
case 6: SetPlayerCheckpoint(playerid,1004.3183,-932.8453,42.1797,15);
case 7: SetPlayerCheckpoint(playerid,315.7915,-162.0369,1.5781,15);
case 8: SetPlayerCheckpoint(playerid,659.1002,-565.2003,16.3359,15);
}
return 0;
}
}
}
}
}
return 1;
}