trucker job - please help
#1

hello
i have problem.
Check Point Is random coordinates.
------------
Coordinates not be loaded.
Why?
Please Help Me.
Sorry. My Bad English.
Thanks
------------
Код:
#include <a_samp>
new PetrolJob[256];
new kamionJob[256];
new Float: trucker1[5][4] = {
  {2788.1924,-2418.2754,13.6336,3.0},
  {2147.6301,-80.7979,2.8140,3.0},
  {-302.0700,1522.0327,75.3594,3.0},
  {-2060.5906,-2519.7815,30.4688,3.0},
  {-2798.7510,-385.9337,6.9702,3.0}
};
new Float: trucker2[5][4] = {
  {2788.1924, -2418.2754, 13.6336, 3.0},
  {2147.6301, -80.7979, 2.8140, 3.0},
  {-302.0700, 1522.0327, 75.3594, 3.0},
  {-2060.5906, -2519.7815, 30.4688, 3.0},
  {-2798.7510, -385.9337, 6.9702, 3.0}
};


public OnFilterScriptInit()
{
    // Kamion
    AddStaticVehicleEx(515,-77.0604,-1109.1392,2.1006,161.8968,56,56,900);
    AddStaticVehicleEx(403,-69.3187,-1111.0873,1.6979,161.5441,88,88,900);
    AddStaticVehicleEx(515,-61.6413,-1114.4617,2.1147,161.6096,99,99,900);
    AddStaticVehicleEx(403,-52.8411,-1116.3395,1.6842,163.5585,77,77,900);
    AddStaticVehicleEx(515,-44.9170,-1119.8474,2.0963,161.1733,66,66,900);
    AddStaticVehicleEx(403,-34.4218,-1122.3091,1.6843,163.0988,55,55,900);
    AddStaticVehicleEx(515, -104.1383, -1109.9535, 3.2905, -17.9400, 44, 44, 900);
    AddStaticVehicleEx(515, -115.4352, -1106.8760, 3.7498, -15.9600, 0, 0, 900);
    AddStaticVehicleEx(515, -126.1507, -1104.3756, 5.1005, -15.7800, 5, 5, 900);
    AddStaticVehicleEx(514, -109.9131, -1108.2990, 3.0601, -17.5800, 1, 1, 900);
    AddStaticVehicleEx(403, -121.0863, -1105.9479, 3.9353, -15.6600, 171, 171, 900);
    // Trailer
    AddStaticVehicleEx(435,-43.4726,-1156.3893,1.6852,62.3521,44,44,900);
    AddStaticVehicleEx(450,-41.3222,-1152.5535,1.6557,59.6268,22,22,900);
    AddStaticVehicleEx(584,-39.8824,-1148.9823,2.4233,58.4713,24,24,900);
    AddStaticVehicleEx(591,-34.7654,-1136.4838,1.7345,63.8468,11,11,900);
    AddStaticVehicleEx(591,-37.6094,-1145.3403,1.7160,59.1655,5,5,900);
    AddStaticVehicleEx(435,-35.7425,-1141.2991,1.7438,60.1880,155,155,900);
    AddStaticVehicleEx(435, -112.7438, -1137.2512, 2.0074, -24.8400, 155, 155, 900);
    AddStaticVehicleEx(450, -122.7545, -1133.3099, 2.7596, -17.0400, 188, 188, 900);
    AddStaticVehicleEx(584, -128.4855, -1131.2206, 3.5201, -16.7400, 250, 250, 900);
    AddStaticVehicleEx(584, -117.8623, -1135.0874, 2.8145, -18.1800, 244, 244, 900);
    AddStaticVehicleEx(591, -133.6348, -1130.5380, 3.5283, -15.8400, 144, 144, 900);
}
public OnPlayerCommandText(playerid, cmdtext[])
{
    if (strcmp("/bar ghanoni", cmdtext, true, 10) == 0)
    {
        if(GetVehicleModel(GetPlayerVehicleID(playerid)) == 403 || GetVehicleModel(GetPlayerVehicleID(playerid)) == 515 || GetVehicleModel(GetPlayerVehicleID(playerid)) == 514)
        {
            if(!IsTrailerAttachedToVehicle(GetPlayerVehicleID(playerid))){ SendClientMessage(playerid,0xFFFFFFFF,"{00CCFF}[Khane] Shoma Trailer Nadarid!"); return 1; }
            if(PetrolJob[playerid] != 1 && PetrolJob[playerid] != 2 && PetrolJob[playerid] != 3){ PetrolJob[playerid] = 1; }
            new name[MAX_PLAYER_NAME], string[128];
            GetPlayerName(playerid, name, sizeof(name));
            format(string, sizeof(string), "{00CCFF}[Khane] Bazikon %s(%d) Dar Hale Hamle Bar Ghanoni Mibashad.", name, playerid);
            SendClientMessageToAll(0xFFFFFFFF, string);

            if(PetrolJob[playerid] == 1){
                PetrolJob[playerid] = 2;
                new rand = random(sizeof(trucker1));
                SetPlayerCheckpoint(playerid, trucker1[rand][0], trucker1[rand][1], trucker1[rand][2], trucker1[rand][3]);
				return 1;
            }
		}
	    return 1;
	}
    if (strcmp("/bar khalaf", cmdtext, true, 10) == 0)
    {
        if(GetVehicleModel(GetPlayerVehicleID(playerid)) == 403 || GetVehicleModel(GetPlayerVehicleID(playerid)) == 515 || GetVehicleModel(GetPlayerVehicleID(playerid)) == 514)
        {
            if(!IsTrailerAttachedToVehicle(GetPlayerVehicleID(playerid))){ SendClientMessage(playerid,0xFFFFFFFF,"{00CCFF}[Khane] Shoma Trailer Nadarid!"); return 1; }
            if(kamionJob[playerid] != 1 && kamionJob[playerid] != 2 && kamionJob[playerid] != 3){ kamionJob[playerid] = 1; }
            new namekhalafkar[MAX_PLAYER_NAME], payamekhalafkar[128];
            GetPlayerName(playerid, namekhalafkar, sizeof(namekhalafkar));
            format(payamekhalafkar, sizeof(payamekhalafkar), "{00CCFF}[Khane] Bazikon %s(%d) Dar Hale Hamle Bar Ghanoni Mibashad.", namekhalafkar, playerid);
            SendClientMessageToAll(0xFFFFFFFF, payamekhalafkar);
            if(kamionJob[playerid] == 1){
                kamionJob[playerid] = 2;
                new rand = random(sizeof(trucker2));
                SetPlayerCheckpoint(playerid, trucker2[rand][0] ,trucker2[rand][1] ,trucker2[rand][2], trucker2[rand][3]);
				return 1;
            }
            return 1;
        }
    }
    return 0;
}
public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
{
     if(GetVehicleModel(GetPlayerVehicleID(playerid)) == 403)
     {
         SendClientMessage(playerid, 0xFFFFFFFF, "{00CCFF}[Khane] Baraye Shoroe Kar, Dastore /bar ghanoni Ya /bar khalaf Ra Type Konid.");
     }
     if(GetVehicleModel(GetPlayerVehicleID(playerid)) == 515)
     {
         SendClientMessage(playerid, 0xFFFFFFFF, "{00CCFF}[Khane] Baraye Shoroe Kar, Dastore /bar ghanoni Ya /bar khalaf Ra Type Konid.");
     }
     if(GetVehicleModel(GetPlayerVehicleID(playerid)) == 514)
     {
         SendClientMessage(playerid, 0xFFFFFFFF, "{00CCFF}[Khane] Baraye Shoroe Kar, Dastore /bar ghanoni Ya /bar khalaf Ra Type Konid.");
     }
     return 0;
}


public OnPlayerEnterCheckpoint(playerid)
{
    if(PetrolJob[playerid] >= 0)
    {
     if(GetVehicleModel(GetPlayerVehicleID(playerid)) == 403 || GetVehicleModel(GetPlayerVehicleID(playerid)) == 515 || GetVehicleModel(GetPlayerVehicleID(playerid)) == 514)
     {
        if(!IsTrailerAttachedToVehicle(GetPlayerVehicleID(playerid))){ SendClientMessage(playerid,0xFFFFFFFF,"{00CCFF}[Khane] Shoma Trailer Nadarid!"); DisablePlayerCheckpoint(playerid); return 1; }
        GivePlayerMoney(playerid,500000);
        SetPlayerScore(playerid,GetPlayerScore(playerid)+1);
        new name[MAX_PLAYER_NAME], barghanoni[128];
        GetPlayerName(playerid, name, sizeof(name));
        format(barghanoni, sizeof(barghanoni), "{00CCFF}[Khane] Bazikon %s(%d) Bar Ra Be Maghsad Resand Va 500,000 Pool + 1 Score Daryaft Kard.", name, playerid);
        SendClientMessageToAll(0xFFFFFFFF,barghanoni);
        DisablePlayerCheckpoint(playerid);
     }
    }
    if(kamionJob[playerid] >= 0)
    {
     if(GetVehicleModel(GetPlayerVehicleID(playerid)) == 403 || GetVehicleModel(GetPlayerVehicleID(playerid)) == 515 || GetVehicleModel(GetPlayerVehicleID(playerid)) == 514)
     {
        if(!IsTrailerAttachedToVehicle(GetPlayerVehicleID(playerid))){ SendClientMessage(playerid,0xFFFFFFFF,"{00CCFF}[Khane] Shoma Trailer Nadarid!"); DisablePlayerCheckpoint(playerid); return 1; }
        GivePlayerMoney(playerid,750000);
        SetPlayerScore(playerid,GetPlayerScore(playerid)+2);
        SetPlayerWantedLevel(playerid,GetPlayerWantedLevel(playerid)+4);
        new name[MAX_PLAYER_NAME], barghanoni[128];
        GetPlayerName(playerid, name, sizeof(name));
        format(barghanoni, sizeof(barghanoni), "{00CCFF}[Khane] Bazikon %s(%d) Bar Ra Be Maghsad Resand Va 750,000 Pool + 2 Score Daryaft Kard.", name, playerid);
        SendClientMessageToAll(0xFFFFFFFF,barghanoni);
        DisablePlayerCheckpoint(playerid);
     }
    }
    return 1;
}


public OnPlayerExitVehicle(playerid, vehicleid)
{
    if(PetrolJob[playerid] >= 0)
    {
        SendClientMessage(playerid, 0xFFFFFFFF, "{00CCFF}[Khane] Shoma Kar Ra Nime Tamam Kardid Va Pooli Daryaft Nakardid.");
        DisablePlayerCheckpoint(playerid);
    }
    if(kamionJob[playerid] >= 0)
    {
        SendClientMessage(playerid, 0xFFFFFFFF, "{00CCFF}[Khane] Shoma Kar Ra Nime Tamam Kardid Va Pooli Daryaft Nakardid.");
        DisablePlayerCheckpoint(playerid);
    }
}
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)