Filterscript loaded but nothing happens !
#1

Guys , this fs didn't work , the 3DTextLabel didn't appear and Checkpoints too
I checked the Log , it loads successfully but nothing happens.
Код:
/*                  01011001 01101111 01110101 01110011 01110011
                    01100101 01100110 01110010 01100101 01100101
                    *FSFR - Full San Fierro Race by Youssefree*                                                   */

#include <a_samp> 

#define winner_money 100000

//CPs
new Float:CheckPoints[159][3] =
{
{-2819.783,-398.911,6.766},
{-2809.968,-252.147,6.758},
{-2810.080,-225.016,6.758},
{-2794.481,-211.181,6.765},
{-2644.037,-211.783,3.889},
{-2605.936,-202.407,3.906},
{-2605.816,-181.893,3.906},
{-2612.862,-72.281,3.936},
{-2762.824,-69.563,6.861},
{-2809.610,-54.324,6.758},
{-2808.544,-34.176,6.767},
{-2808.079,-13.900,6.759},
{-2809.586,21.216,6.759},
{-2791.962,39.080,6.764},
{-2514.187,40.846,24.528},
{-2501.485,25.409,25.217},
{-2495.585,-71.188,25.284},
{-2344.810,-70.143,34.891},
{-2194.779,-70.182,34.899},
{-2044.122,-70.323,34.895},
{-2010.780,-60.937,34.896},
{-2006.482,12.679,32.920},
{-2024.180,28.823,33.375},
{-2107.160,43.043,34.891},
{-2106.622,73.367,34.891},
{-2105.858,95.616,34.891},
{-2120.015,111.003,34.900},
{-2150.456,120.943,34.896},
{-2148.517,140.975,34.898},
{-2146.512,167.034,34.898},
{-2148.205,221.273,34.898},
{-2136.215,318.486,34.888},
{-1988.034,344.208,34.617},
{-1878.934,367.942,22.763},
{-1876.119,387.952,18.374},
{-1867.623,406.948,16.744},
{-1818.817,492.369,26.417},
{-1917.438,604.859,34.743},
{-1998.778,597.280,34.774},
{-2116.668,504.444,34.742},
{-2229.343,489.635,34.743},
{-2253.935,341.613,33.600},
{-2262.293,319.931,34.957},
{-2400.340,257.083,27.458},
{-2515.275,162.980,3.902},
{-1550.646,854.280,6.763},
{-1699.558,850.754,24.461},
{-1716.607,887.708,24.468},
{-1692.472,922.648,24.466},
{-1543.459,936.569,6.766},
{-1529.301,961.379,6.774},
{-1588.902,1075.087,6.766},
{-1587.704,1109.483,6.766},
{-1607.894,1204.251,6.867},
{-1714.381,1181.824,24.703},
{-1790.326,1052.496,34.903},
{-1818.023,928.836,24.621},
{-1897.709,897.294,34.742},
{-1918.052,842.910,35.584},
{-2004.154,851.398,45.025},
{-2002.552,871.965,45.023},
{-2001.536,901.342,45.026},
{-2038.909,945.553,49.893},
{-2043.492,926.222,52.245},
{-2059.052,937.818,57.985},
{-2071.125,922.622,63.013},
{-2088.739,930.117,69.099},
{-2100.732,915.239,75.637},
{-2205.752,811.135,49.734},
{-2261.793,781.881,49.023},
{-2333.936,668.207,39.265},
{-2384.494,680.117,34.742},
{-2397.705,707.966,34.740},
{-2524.940,698.340,27.547},
{-2526.614,548.289,14.195},
{-2544.608,470.934,14.191},
{-2604.399,474.915,14.180},
{-2606.405,508.682,14.188},
{-2605.525,532.551,14.188},
{-2619.037,564.501,14.187},
{-2748.431,577.849,14.189},
{-2751.263,597.592,19.938},
{-2751.317,616.896,26.486},
{-2751.038,640.239,27.517},
{-2751.864,663.837,34.409},
{-2737.593,710.333,40.852},
{-2602.196,722.245,27.939},
{-2608.375,741.220,29.922},
{-2607.763,760.697,36.951},
{-2607.269,780.863,44.238},
{-2607.237,800.320,49.566},
{-2588.440,808.987,49.555},
{-2438.742,808.788,34.758},
{-2386.951,825.893,35.839},
{-2387.134,846.578,39.591},
{-2386.840,866.889,43.250},
{-2387.543,887.601,45.035},
{-2389.180,916.507,45.024},
{-2374.370,961.342,45.025},
{-2264.093,977.634,69.981},
{-2263.649,996.398,77.735},
{-2261.835,1015.659,83.355},
{-2141.989,1051.812,79.578},
{-2142.057,1072.123,79.572},
{-2141.202,1094.344,79.573},
{-2140.512,1114.171,76.182},
{-2136.590,1135.054,66.807},
{-2141.202,1162.380,55.732},
{-2123.782,1173.561,55.305},
{-1973.678,1178.306,45.024},
{-1969.577,1158.157,45.666},
{-1921.757,1076.451,49.276},
{-1888.479,1085.558,45.023},
{-1882.654,1135.954,45.023},
{-1884.286,1193.410,44.726},
{-1883.610,1213.465,39.296},
{-1813.030,1270.991,14.826},
{-1722.636,1300.601,6.769},
{-1730.122,1320.285,6.766},
{-1831.370,1357.048,6.765},
{-1965.259,1287.976,6.766},
{-2114.736,1273.396,18.491},
{-2259.656,1248.353,43.695},
{-2262.136,1102.384,80.395},
{-2261.132,953.020,66.199},
{-2265.061,804.366,49.023},
{-2385.620,782.456,34.748},
{-2386.178,632.208,34.159},
{-2404.503,564.596,24.468},
{-2525.650,554.373,14.196},
{-2547.135,469.858,14.191},
{-2696.775,466.217,3.840},
{-2846.741,470.903,3.845},
{-2698.665,1425.354,6.828},
{-2698.613,1296.335,6.859},
{-2562.500,1360.112,6.766},
{-2411.544,1375.003,6.766},
{-2264.432,1341.189,6.881},
{-2114.355,1329.725,6.766},
{-1964.401,1310.800,6.766},
{-1821.162,1357.624,6.769},
{-1693.904,1277.917,6.765},
{-1619.589,1186.826,6.811},
{-1768.902,1184.330,24.699},
{-1882.827,1160.853,45.024},
{-1920.489,1075.402,49.047},
{-2071.738,1076.356,55.294},
{-2224.531,1078.005,55.305},
{-2374.350,1096.843,55.307},
{-2524.050,1119.506,55.305},
{-2654.446,1195.754,55.157},
{-2677.200,1277.373,55.156},
{-2673.988,1318.617,55.156},
{-2674.625,1469.327,55.378},
{-2674.946,1619.605,64.859},
{-2675.255,1770.901,67.840},
{-2675.534,1922.283,64.319},
{-2675.554,1948.037,63.091},
{-2673.385,2036.146,57.420}
};

new Player_CheckPoint[MAX_PLAYERS];
new bool:IsRaceRunning = false;
new WinnerName[MAX_PLAYER_NAME];
new stringwin[64];

// Init
public OnPlayerEnterRaceCheckpoint(playerid)
{
        if(IsRaceRunning == true) { Player_CheckPoint[playerid]++; }
        if(Player_CheckPoint[playerid] < 9 && IsRaceRunning == true)
        {
                DisablePlayerRaceCheckpoint(playerid);
                SetPlayerRaceCheckpoint(playerid,0,CheckPoints[Player_CheckPoint[playerid]][0],CheckPoints[Player_CheckPoint[playerid]][1],CheckPoints[Player_CheckPoint[playerid]][2],CheckPoints[Player_CheckPoint[playerid]+1][0],CheckPoints[Player_CheckPoint[playerid]+1][1],CheckPoints[Player_CheckPoint[playerid]+1][2],9.7);
                return 1;
        }
        if(Player_CheckPoint[playerid] == 9 && IsRaceRunning == true)
        {
                DisablePlayerRaceCheckpoint(playerid);
                SetPlayerRaceCheckpoint(playerid,0,CheckPoints[Player_CheckPoint[playerid]][0],CheckPoints[Player_CheckPoint[playerid]][1],CheckPoints[Player_CheckPoint[playerid]][2],CheckPoints[Player_CheckPoint[playerid]+1][0],CheckPoints[Player_CheckPoint[playerid]+1][1],CheckPoints[Player_CheckPoint[playerid]+1][2],9.7);
                return 1;
        }
        if(Player_CheckPoint[playerid] == 10 && IsRaceRunning == true)
        {
                for(new i = 0; i < MAX_PLAYERS; i++)
                {
                    DisablePlayerRaceCheckpoint(i);
                }
                GetPlayerName(playerid,WinnerName,sizeof(WinnerName));
                format(stringwin,sizeof(stringwin),"[RACE] The race is over, %s has won and achieved $%d!",WinnerName,winner_money);
                SendClientMessageToAll(0xFF0000FF,stringwin);
                GivePlayerMoney(playerid,winner_money);
                IsRaceRunning = false;
                return 1;
        }
        return 1;
}

public OnGameModeInit()
{
    // Credits and Start Place
    Create3DTextLabel("Welcome To FSFR!", 0x008080FF, -2821.2642, -443.1027, 7.0391, 0, 0);
    Create3DTextLabel("The BIG SF RACE,", 0x008080FF, -2821.2642, -444.1027, 7.0391, 0, 0);
    Create3DTextLabel("By Youssefree ;D,", 0xFFA200FF, -2821.2642, -445.1027, 7.0391, 0, 0);
    Create3DTextLabel("Winner Will Get 100000$,", 0x0A4DA4FF, -2821.2642, -446.1027, 7.0391, 0, 0);

    for(new i = 0; i < MAX_PLAYERS; i++)
    {
        if(IsPlayerConnected(i))
        {
            Player_CheckPoint[i] = 0;
            SetPlayerRaceCheckpoint(i,0,CheckPoints[0][0],CheckPoints[0][1],CheckPoints[0][2],CheckPoints[1][0],CheckPoints[1][1],CheckPoints[1][2],9.7);
            IsRaceRunning = true;
        }
    }
    return 1;
}
Reply
#2

Quote:

public OnGameModeInit()
{

Are you sure it's FilterScript?
Reply
#3

Quote:
Originally Posted by Alpay0098
Посмотреть сообщение
Are you sure it's FilterScript?
Yeah , it's mine
and help pls
Reply
#4

Dude,
Change OnGameModeInit to OnFilterscriptInit
Reply
#5

Quote:
Originally Posted by Alpay0098
Посмотреть сообщение
Dude,
Change OnGameModeInit to OnFilterscriptInit
Ok , i'll try it
EDIT : Nothing
Reply
#6

Quote:
Originally Posted by Alpay0098
Посмотреть сообщение
Dude,
Change OnGameModeInit to OnFilterscriptInit
It didn't work
Reply
#7

put this code in your gamemode
Reply
#8

Quote:
Originally Posted by Owen007
Посмотреть сообщение
put this code in your gamemode
How I forgot it
rep'ed
Reply
#9

Quote:
Originally Posted by Owen007
Посмотреть сообщение
put this code in your gamemode
Quote:
Originally Posted by Alpay0098
Посмотреть сообщение
How I forgot it
rep'ed
i want it as a filterscript
can you tell me what missing ?
Reply
#10

public OnFilescriptnit()
{
// Credits and Start Place
Create3DTextLabel("Welcome To FSFR!", 0x008080FF, -2821.2642, -443.1027, 7.0391, 0, 0);
Create3DTextLabel("The BIG SF RACE,", 0x008080FF, -2821.2642, -444.1027, 7.0391, 0, 0);
Create3DTextLabel("By Youssefree ,", 0xFFA200FF, -2821.2642, -445.1027, 7.0391, 0, 0);
Create3DTextLabel("Winner Will Get 100000$,", 0x0A4DA4FF, -2821.2642, -446.1027, 7.0391, 0, 0);

for(new i = 0; i < MAX_PLAYERS; i++)
{
if(IsPlayerConnected(i))
{
Player_CheckPoint[i] = 0;
SetPlayerRaceCheckpoint(i,0,CheckPoints[0][0],CheckPoints[0][1],CheckPoints[0][2],CheckPoints[1][0],CheckPoints[1][1],CheckPoints[1][2],9.7);
IsRaceRunning = true;
}
}
return 1;
}
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)