HELP!! PAWNO ERRORS
#1

Hi im a noob to scripting with pawno all i know is how to spawn vehicles and players and stuff.

i was trying to input these commands into pawno but kept coming with these errors i fixed a lot by my own but these im just not sure about any help would be hugely appreciated

i uploaded the .pwn file if anyone can look over it thanks!!
Reply
#2

You've just gave away your Gamemode.
Reply
#3

Quote:
Originally Posted by [FU]Victious
Посмотреть сообщение
You've just gave away your Gamemode.
No, he just threw his garbage out.
Reply
#4

Quote:
Originally Posted by Hashski
Посмотреть сообщение
No, he just threw his garbage out.
I havn't seen it, RP is shit.
Reply
#5

Dude are you dumb or something?
#define GetVehicleParamsEx

Script like a noob again and i wont help you
Here

pawn Код:
// This is a comment
// uncomment the line below if you want to write a filterscript
//#define FILTERSCRIPT

#include <a_samp>
#include <streamer>
#define TEAM_GROVE 1                              //Team Colors
#define TEAM_BALLA 2
#define TEAM_GROVE_COLOR 0x00FF00AA
#define TEAM_BALLA_COLOR 0xFF00FFAA
new gTeam[MAX_PLAYERS];
#define VEHICLE_PARAMS_UNSET    -1                //Vehicle Control
#define VEHICLE_PARAMS_OFF  0
#define VEHICLE_PARAMS_ON   1
#define FILTERSCRIPT
#include <a_samp>
#define TEXT 0xFF9900AA
#if defined FILTERSCRIPT
#define CAR1 1337
#define CAR2 1338
#define CAR3 1339
#define CAR4 1400
#define CAR5 1401
#define CAR6 1402
#define CAR7 1403

new engine,lights,alarm,doors,bonnet,boot,objective;
#if defined FILTERSCRIPT

public OnFilterScriptInit()
{
    print("\n--------------------------------------");
    print(" Blank Filterscript by your name here");
    print("--------------------------------------\n");
    print("\n--------------------------------------");
    print(" Vehicle Control By AlexzzPro");
    print("--------------------------------------\n");
    return 1;
}


public OnFilterScriptExit()
{
    return 1;
}


#else

main()
{
    print("\n----------------------------------");
    print("Damian_Wayne");
    print("----------------------------------\n");
}
#endif

public OnGameModeInit()
{
// Don't use these lines if it's a filterscript
    SetGameModeText("FiveStars RP");
    CreateDynamicObject(987, 177.29, 1875.12, 20.00,   0.00, 0.00, 0.00);
    CreateDynamicObject(987, 2720.33, -2389.36, 12.49,   0.00, 0.00, 269.92);
    CreateDynamicObject(987, 2720.34, -2409.71, 12.50,   0.00, 0.00, 270.12);
    CreateDynamicObject(987, 2720.29, -2487.88, 12.60,   0.00, 0.00, 269.80);
    CreateDynamicObject(987, 2720.25, -2508.35, 12.00,   0.00, 0.00, 271.93);
    CreateDynamicObject(3279, 2725.17, -2413.72, 12.60,   0.00, 0.00, 0.00);
    CreateDynamicObject(3279, 2724.86, -2494.38, 13.00,   0.00, 0.00, 0.00);
    CreateDynamicObject(3279, 2802.93, -2475.03, 13.00,   0.00, 0.00, 179.46);
    CreateDynamicObject(3279, 2803.51, -2437.41, 13.00,   0.00, 0.00, 179.33);
    CreateDynamicObject(3279, 2803.83, -2400.89, 13.00,   0.00, 0.00, 179.81);
    CreateDynamicObject(987, 2720.33, -2389.36, 12.49,   0.00, 0.00, 269.92);
    CreateDynamicObject(987, 2720.34, -2409.71, 12.50,   0.00, 0.00, 270.12);
    CreateDynamicObject(987, 2720.29, -2487.88, 12.10,   0.00, 0.00, 269.80);
    CreateDynamicObject(987, 2720.25, -2508.35, 12.00,   0.00, 0.00, 271.93);
    CreateDynamicObject(3279, 2725.17, -2413.72, 12.60,   0.00, 0.00, 0.00);
    CreateDynamicObject(3279, 2724.86, -2494.38, 13.00,   0.00, 0.00, 0.00);
    CreateDynamicObject(3279, 2802.93, -2475.03, 13.00,   0.00, 0.00, 179.46);
    CreateDynamicObject(3279, 2803.51, -2437.41, 13.00,   0.00, 0.00, 179.33);
    CreateDynamicObject(3279, 2803.83, -2400.89, 13.00,   0.00, 0.00, 179.81);
    CreateDynamicObject(987, 2727.06, -2550.00, 13.00,   0.00, 0.00, 269.88);
    CreateDynamicObject(987, 2727.03, -2553.44, 13.00,   0.00, 0.00, 269.94);
    CreateDynamicObject(3279, 2803.48, -2513.70, 13.00,   0.00, 0.00, 179.84);
    CreateDynamicObject(3279, 2732.49, -2556.22, 13.00,   0.00, 0.00, 0.21);
    CreateDynamicObject(987, 2753.98, -2342.04, 12.30,   0.00, 0.00, 270.30);
    CreateDynamicObject(987, 2753.99, -2330.12, 12.30,   0.00, 0.00, 269.84);
    CreateDynamicObject(4100, 2733.09, -2424.55, 18.29,   0.00, 0.00, 50.02);
    CreateDynamicObject(4100, 2733.08, -2438.33, 18.29,   0.00, 0.00, 50.09);
    CreateDynamicObject(4100, 2733.08, -2480.10, 18.29,   0.00, 0.00, 50.05);
    CreateDynamicObject(4100, 2733.09, -2466.40, 18.34,   0.00, 0.00, 50.10);
    CreateDynamicObject(4100, 2733.07, -2459.18, 18.34,   0.00, 0.00, 49.93);
    CreateDynamicObject(970, 2731.01, -2417.93, 17.13,   0.00, 0.00, 0.00);
    CreateDynamicObject(970, 2731.02, -2487.23, 17.09,   0.00, 0.00, 0.00);
    CreateDynamicObject(18807, 2785.92, -2292.57, 2.22,   0.00, 0.00, 89.99);
    CreateDynamicObject(12857, 2785.47, -2249.11, -1.97,   0.00, 0.00, 359.91);
    CreateDynamicObject(5520, 2793.06, -2454.64, 17.66,   0.00, 0.00, 270.08);
    CreateDynamicObject(987, 2775.15, -2430.32, 12.50,   0.00, 0.00, 269.05);
    CreateDynamicObject(987, 2774.92, -2442.27, 12.50,   0.00, 0.00, 268.79);
    CreateDynamicObject(987, 2774.50, -2469.89, 12.50,   0.00, 0.00, 269.54);
    CreateDynamicObject(987, 2774.62, -2457.98, 12.50,   0.00, 0.00, 269.41);
    CreateDynamicObject(987, 2810.51, -2430.31, 12.60,   0.00, 0.00, 180.00);
    CreateDynamicObject(987, 2798.59, -2481.37, 12.50,   0.00, 0.00, 0.00);
    CreateDynamicObject(12857, 2814.80, -2439.86, 8.57,   0.00, 0.00, 90.00);
    CreateDynamicObject(8615, 2849.04, -2450.52, 17.41,   0.00, 0.00, 89.41);
    CreateDynamicObject(3469, 2768.97, -2358.69, 15.43,   0.00, 0.00, 0.50);
    CreateDynamicObject(3473, 2768.98, -2358.71, 15.63,   0.00, 0.00, 0.30);
    CreateDynamicObject(987, 2754.70, -2383.67, 12.59,   0.00, 0.00, 0.00);
    CreateDynamicObject(987, 2766.57, -2383.66, 12.60,   0.00, 0.00, 0.00);
    CreateDynamicObject(987, 2778.34, -2393.41, 12.50,   0.00, 0.00, 269.38);
    CreateDynamicObject(5837, 2775.50, -2399.57, 14.13,   0.00, 0.00, 90.00);
    CreateDynamicObject(987, 2765.73, -2330.42, 12.58,   0.00, 0.00, 180.67);
    CreateDynamicObject(987, 2777.74, -2330.36, 12.59,   0.00, 0.00, 180.40);
    AddPlayerClass(23, 709.9833,-1276.1959,30.4374,0.4349,29,1000,26,1000,31,1000);
    AddPlayerClass(105, -2141.6165,-247.7926,36.5156,92.2761,29,1000,26,1000,31,1000);
    AddPlayerClass(106, -2141.6165,-247.7926,36.5156, 92.2761,29,1000,26,1000,31,1000);
    AddPlayerClass(107, -2141.6165,-247.7926,36.5156,92.2761,29,1000,26,1000,31,1000);
    AddPlayerClass(102, -2446.3325,528.5332,30.2028,270.6186,29,1000,26,1000,31,1000);
    AddPlayerClass(103, -2446.3325,528.5332,30.2028,270.6186,29,1000,26,1000,31,1000);
    AddPlayerClass(104, -2446.3325,528.5332,30.2028,270.6186,29,1000,26,1000,31,1000);
    AddStaticVehicle(402, -2029.2014,156.4923,28.6676,359.8787,14,14);
    AddStaticVehicle(402, -2169.0222,-219.2905,35.1520,359.5715,44,0);
    AddStaticVehicle(470, -2174.1414,-219.5512,35.3151,0.6515,57,57);
    AddStaticVehicle(461, -2162.2415,-218.2862,34.9043,357.6591,44,0);
    AddStaticVehicle(461, -2165.3486,-218.8428,34.8974,356.7448,44,0);
    AddStaticVehicle(487, -2121.6377,-248.9943,35.1520,0.6051,44,0);
    AddStaticVehicle(487, -2106.4312,-247.9838,35.1520,1.9446,44,0);
    AddStaticVehicle(428, -2185.5059,-209.6597,36.6404,270.1573,44,0);
    AddStaticVehicle(402, 657.4455,-1288.3832,13.4681,270.5718,22,0);
    AddStaticVehicle(402, 657.5878,-1282.5050,13.4666,270.0953,22,0);
    AddStaticVehicle(470, 657.7415,-1276.5251,13.4652,270.5334,57,57);
    AddStaticVehicle(470, 657.5646,-1270.6713,13.4634,269.9255, 57, 57);
    AddStaticVehicle(451, 657.6456,-1264.7101,13.4600,270.4716, 22, 0);
    AddStaticVehicle(451, 657.6934,-1258.6688,13.4600,269.9119, 22, 0);
    AddStaticVehicle(502, 657.4372,-1301.4648,13.4646,269.6745, 22, 0);
    AddStaticVehicle(502, 657.5717,-1294.8822,13.4645,270.3899, 22, 0);
    AddStaticVehicle(428, 682.9639,-1302.6322,13.4415,90.6029,22,0);
    AddStaticVehicle(487, 681.5033,-1261.5571,13.4091,90.4428,22,0);
    AddStaticVehicle(487, -2472.5837,495.1657,30.0687,271.2453,22,0);
    return 1;
}


public OnGameModeExit()
{
    return 1;
}


public OnPlayerRequestClass(playerid, classid)
{
    SetPlayerTeamFromClass(playerid, classid);
    SetPlayerPos(playerid, -2090.8870,175.8640,38.0798);
    SetPlayerCameraPos(playerid, -2086.8359,175.4719,38.0798);
    SetPlayerCameraLookAt(playerid, -2090.8870,175.8640,38.0798);
    return 1;
}

public OnPlayerSpawn(playerid)
{
    SetPlayerToTeamColor(playerid);
    SetPlayerPos(23, 709.9833,-1276.1959,30.4374);
    SetPlayerPos(105, -2141.6165,-247.7926,36.5156);
    SetPlayerPos(106, -2141.6165,-247.7926,36.5156);
    SetPlayerPos(107, -2141.6165,-247.7926,36.5156);
    SetPlayerPos(102, 2797.8613,-2494.5933,13.6380);
    SetPlayerPos(103, 2797.8613,-2494.5933,13.6380);
    SetPlayerPos(104, 2797.8613,-2494.5933,13.6380);
    return 1;
}


public OnPlayerCommandText(playerid, cmdtext[])
{
    if (strcmp("/car", cmdtext, true, 10) == 0) {
        if(IsPlayerInAnyVehicle(playerid)) {
            if(GetPlayerState(playerid) == PLAYER_STATE_PASSENGER) {
                SendClientMessage(playerid, TEXT, "You are not the driver");
                return 1;
            }
            ShowPlayerDialog(playerid, CAR1, DIALOG_STYLE_LIST, "Vehicle Control - By AlexzzPro","Engine\nLights\nTrunk\nHood\nAlarm\nLock","Choose","Close");
        }
        else {
            SendClientMessage(playerid, TEXT, "You are not in a vehicle");
            return 1;
        }
        return 1;
    }
    return 0;
}


public OnPlayerStateChange(playerid, newstate, oldstate)
{
    if(newstate == PLAYER_STATE_DRIVER) {
        SendClientMessage(playerid, TEXT, "Type /car to control your vehicle");
        return 1;
    }
    return 1;
}


public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
    if(dialogid == CAR5) {
        if(response) {
            new vid = GetPlayerVehicleID(playerid);
            GetVehicleParamsEx(vid, engine, lights, alarm, doors, bonnet, boot, objective);
            SetVehicleParamsEx(vid,engine,lights,alarm,doors,VEHICLE_PARAMS_ON,boot,objective);
            SendClientMessage(playerid, TEXT, "Your hood is open");
        }
        if(!response) {
            new vid = GetPlayerVehicleID(playerid);
            GetVehicleParamsEx(vid,engine,lights,alarm,doors,bonnet,boot,objective);
            SetVehicleParamsEx(vid,engine,lights,alarm,doors,VEHICLE_PARAMS_OFF,boot,objective);
            SendClientMessage(playerid, TEXT, "Your hood is closed");
        }
    }
    if(dialogid == CAR6) {
        if(response) {
            new vid = GetPlayerVehicleID(playerid);
            GetVehicleParamsEx(vid,engine,lights,alarm,doors,bonnet,boot,objective);
            SetVehicleParamsEx(vid,engine,lights,VEHICLE_PARAMS_ON,doors,bonnet,boot,objective);
            SendClientMessage(playerid, TEXT, "Your alarm is on");
        }
        if(!response) {
            new vid = GetPlayerVehicleID(playerid);
            GetVehicleParamsEx(vid,engine,lights,alarm,doors,bonnet,boot,objective);
            SetVehicleParamsEx(vid,engine,lights,VEHICLE_PARAMS_OFF,doors,bonnet,boot,objective);
            SendClientMessage(playerid, TEXT, "Your alarm is off");
        }
    }
    if(dialogid == CAR7) {
        if(response) {
            new vid = GetPlayerVehicleID(playerid);
            GetVehicleParamsEx(vid,engine,lights,alarm,doors,bonnet,boot,objective);
            SetVehicleParamsEx(vid,engine,lights,alarm,VEHICLE_PARAMS_OFF,bonnet,boot,objective);
            SendClientMessage(playerid, TEXT, "Your doors are now locked");
        }
        if(!response) {
            new vid = GetPlayerVehicleID(playerid);
            GetVehicleParamsEx(vid,engine,lights,alarm,doors,bonnet,boot,objective);
            SetVehicleParamsEx(vid,engine,lights,alarm,VEHICLE_PARAMS_ON,bonnet,boot,objective);
            SendClientMessage(playerid, TEXT, "Your doors are now unlocked");
        }
    }
    if(dialogid == CAR2) {
        if(response) {
            new vid = GetPlayerVehicleID(playerid);
            GetVehicleParamsEx(vid,engine,lights,alarm,doors,bonnet,boot,objective);
            SetVehicleParamsEx(vid,VEHICLE_PARAMS_ON,lights,alarm,doors,bonnet,boot,objective);
            SendClientMessage(playerid, TEXT, "Your engine is on");
        }
        if(!response) {
            new vid = GetPlayerVehicleID(playerid);
            GetVehicleParamsEx(vid,engine,lights,alarm,doors,bonnet,boot,objective);
            SetVehicleParamsEx(vid,VEHICLE_PARAMS_OFF,lights,alarm,doors,bonnet,boot,objective);
            SendClientMessage(playerid, TEXT, "Your engine is off");
        }
    }
    if(dialogid == CAR3) {
        if(response) {
            new vid = GetPlayerVehicleID(playerid);
            GetVehicleParamsEx(vid,engine,lights,alarm,doors,bonnet,boot,objective);
            SetVehicleParamsEx(vid,engine,VEHICLE_PARAMS_ON,alarm,doors,bonnet,boot,objective);
            SendClientMessage(playerid, TEXT, "Your lights are on");
        }
        if(!response) {
            new vid = GetPlayerVehicleID(playerid);
            GetVehicleParamsEx(vid,engine,lights,alarm,doors,bonnet,boot,objective);
            SetVehicleParamsEx(vid,engine,VEHICLE_PARAMS_OFF,alarm,doors,bonnet,boot,objective);
            SendClientMessage(playerid, TEXT, "Your lights are off");
        }
    }
    if(dialogid == CAR4) {
        if(response) {
            new vid = GetPlayerVehicleID(playerid);
            GetVehicleParamsEx(vid,engine,lights,alarm,doors,bonnet,boot,objective);
            SetVehicleParamsEx(vid,engine,lights,alarm,doors,bonnet,VEHICLE_PARAMS_ON,objective);
            SendClientMessage(playerid, TEXT, "Your trunk is open");
        }
        if(!response) {
            new vid = GetPlayerVehicleID(playerid);
            GetVehicleParamsEx(vid,engine,lights,alarm,doors,bonnet,boot,objective);
            SetVehicleParamsEx(vid,engine,lights,alarm,doors,bonnet,VEHICLE_PARAMS_OFF,objective);
            SendClientMessage(playerid, TEXT, "Your trunk is closed");
        }
    }
    if(dialogid == CAR1) {
        if(response) {
            if(listitem == 0) {
                ShowPlayerDialog(playerid, CAR2, DIALOG_STYLE_MSGBOX, "Engine","Do you wanna turn on/off your engine","On","Off");
            }
            if(listitem == 1) {
                ShowPlayerDialog(playerid, CAR3, DIALOG_STYLE_MSGBOX, "Lights","Do you wanna turn on/off your lights","On","Off");
            }
            if(listitem == 2) {
                ShowPlayerDialog(playerid, CAR4, DIALOG_STYLE_MSGBOX, "Trunk","Do you wanna open/close your trunk","Open","Close");
            }
            if(listitem == 3) {
                ShowPlayerDialog(playerid, CAR5, DIALOG_STYLE_MSGBOX, "Hood","Do you wanna open/close your hood","Open","Close");
            }
            if(listitem == 4) {
                ShowPlayerDialog(playerid, CAR6, DIALOG_STYLE_MSGBOX, "Alarm","Do you wanna turn on/off your alarm","On","Off");
            }
            if(listitem == 5) {
                ShowPlayerDialog(playerid, CAR7, DIALOG_STYLE_MSGBOX, "Lock","Do you wanna lock/unlock your doors","Lock","Unlock");
            }
        }
    }
    return 1;
}


public OnPlayerClickPlayer(playerid, clickedplayerid, source)
{
    return 1;
}


forward SetPlayerTeamFromClass(playerid, classid);
public SetPlayerTeamFromClass(playerid, classid)
{
    if (classid == 0) {
        gTeam[playerid] = TEAM_GROVE;
    }
    else {
        gTeam[playerid] = TEAM_BALLA;
    }
    return 1;
}


forward SetPlayerToTeamColor(playerid);
public SetPlayerToTeamColor(playerid)
{
    if (gTeam[playerid] == TEAM_GROVE) {
        SetPlayerColor(playerid, TEAM_GROVE_COLOR);
    }
    else if (gTeam[playerid] == TEAM_BALLA) {
        SetPlayerColor(playerid, TEAM_BALLA_COLOR);
    }
    return 1;
}
#endif
Cause im nice.

AND YOU BETTER SAY THANK YOU.
Reply
#6

THANK YOU SO MUCH FOR THE CORRECT SCRIPT I AM IN FOREVER IN DEBT TO U!!!!!!!!!
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)