SA-MP Forums Archive
nitro system help - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: nitro system help (/showthread.php?tid=401880)



nitro system help - Ryox175 - 24.12.2012

Hai, I got sum error, at line 26

I was testing my nitro script and BOOM: 1 error

Pawn compiler:
Код:
C:\Documents and Settings\karu\My Documents\samp03e_svr_R2_win32\filterscripts\nosandjump.pwn(26) : error 010: invalid function or declaration
whole pawn code.
pawn Код:
// ----------- Mady by: Ryox178 -----------//
//_______________________________________________________//
#define FILTERSCRIPT

#include <a_samp>

#define COLOR_NGREEN      0x00FF00FF

#if defined FILTERSCRIPT

public OnFilterScriptInit()
{
        return 1;
}

public OnFilterScriptExit()
{
        return 1;
}

#else

main()
{
#endif
)
public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
{
if (newkeys & KEY_CROUCH)
    {
        if(IsPlayerInAnyVehicle(playerid))
        {
            new
                            Float:x,
                                Float:y,
                                Float:z;

            GetVehicleVelocity(GetPlayerVehicleID(playerid), x, y, z);
            SetVehicleVelocity(GetPlayerVehicleID(playerid), x, y, z + 0.2);
        }
        }
if(GetPlayerState(playerid) != PLAYER_STATE_DRIVER || !CheckNitro(GetPlayerVehicleID(playerid))) return false; else     if ((((newkeys & (4)) == (4)) && ((oldkeys & (4)) != (4)))) AddVehicleComponent(GetPlayerVehicleID(playerid), 1010); else if ((((newkeys & (4)) != (4)) && ((oldkeys & (4)) == (4)))) RemoveVehicleComponent(GetPlayerVehicleID(playerid), 1010);
return 1;
}
CheckNitro(vid)
{
    new NoNitro[] = { 522,481,441,468,448,446,513,521,510,430,520,476,463 };
    for(new f = 0; f < sizeof(NoNitro); f++) if(GetVehicleModel(vid) == NoNitro[f]) return false;
    return true;
}
can anyone help ?


Re: nitro system help - InfiniTy. - 24.12.2012

Quote:
Originally Posted by Ryox175
Посмотреть сообщение
Hai, I got sum error, at line 26

I was testing my nitro script and BOOM: 1 error

Pawn compiler:
Код:
C:\Documents and Settings\karu\My Documents\samp03e_svr_R2_win32\filterscripts\nosandjump.pwn(26) : error 010: invalid function or declaration
whole pawn code.
pawn Код:
// ----------- Mady by: Ryox178 -----------//
//_______________________________________________________//


#include <a_samp>

#define COLOR_NGREEN      0x00FF00FF

#if defined FILTERSCRIPT

public OnFilterScriptInit()
{
        return 1;
}

public OnFilterScriptExit()
{
        return 1;
}

#else

main()
{
#endif
)
public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
{
if (newkeys & KEY_CROUCH)
    {
        if(IsPlayerInAnyVehicle(playerid))
        {
            new
                            Float:x,
                                Float:y,
                                Float:z;

            GetVehicleVelocity(GetPlayerVehicleID(playerid), x, y, z);
            SetVehicleVelocity(GetPlayerVehicleID(playerid), x, y, z + 0.2);
        }
        }
if(GetPlayerState(playerid) != PLAYER_STATE_DRIVER || !CheckNitro(GetPlayerVehicleID(playerid))) return false; else     if ((((newkeys & (4)) == (4)) && ((oldkeys & (4)) != (4)))) AddVehicleComponent(GetPlayerVehicleID(playerid), 1010); else if ((((newkeys & (4)) != (4)) && ((oldkeys & (4)) == (4)))) RemoveVehicleComponent(GetPlayerVehicleID(playerid), 1010);
return 1;
}
CheckNitro(vid)
{
    new NoNitro[] = { 522,481,441,468,448,446,513,521,510,430,520,476,463 };
    for(new f = 0; f < sizeof(NoNitro); f++) if(GetVehicleModel(vid) == NoNitro[f]) return false;
    return true;
}
can anyone help ?
pawn Код:
// ----------- Mady by: Ryox178 -----------//
//_______________________________________________________//
#define FILTERSCRIPT

#include <a_samp>

#define COLOR_NGREEN      0x00FF00FF


public OnFilterScriptInit()
{
        return 1;
}

public OnFilterScriptExit()
{
        return 1;
}

public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
{
if (newkeys & KEY_CROUCH)
    {
        if(IsPlayerInAnyVehicle(playerid))
        {
            new
                            Float:x,
                                Float:y,
                                Float:z;

            GetVehicleVelocity(GetPlayerVehicleID(playerid), x, y, z);
            SetVehicleVelocity(GetPlayerVehicleID(playerid), x, y, z + 0.2);
        }
        }
if(GetPlayerState(playerid) != PLAYER_STATE_DRIVER || !CheckNitro(GetPlayerVehicleID(playerid))) return false; else     if ((((newkeys & (4)) == (4)) && ((oldkeys & (4)) != (4)))) AddVehicleComponent(GetPlayerVehicleID(playerid), 1010); else if ((((newkeys & (4)) != (4)) && ((oldkeys & (4)) == (4)))) RemoveVehicleComponent(GetPlayerVehicleID(playerid), 1010);
return 1;
}
CheckNitro(vid)
{
    new NoNitro[] = { 522,481,441,468,448,446,513,521,510,430,520,476,463 };
    for(new f = 0; f < sizeof(NoNitro); f++) if(GetVehicleModel(vid) == NoNitro[f]) return false;
    return true;
}



Re: nitro system help - Ryox175 - 24.12.2012

thanks, i repped you thanks reallly. I'm glad i can use it