#9

Quote:
Originally Posted by VishvaJeet
Посмотреть сообщение
Show the Error of your Pawno Compiler.

Here is the code of only mechanic can enter in mechanic vehicle.
Код:
new mech_vehicles[5];
new Mechanic[MAX_PLAYERS];

mech_vehicles[0] = AddStaticVehicle(525,1897.2861,-1874.5471,13.4254,90.3112,44,51); //
mech_vehicles[1] = AddStaticVehicle(525,1897.3396,-1863.3942,13.5911,90.1349,22,30); //
mech_vehicles[2] = AddStaticVehicle(525,1897.6108,-1868.9780,13.4919,90.9807,36,43); //
mech_vehicles[3] = AddStaticVehicle(525,1897.5637,-1857.8895,13.6275,90.9819,18,20); //
mech_vehicles[4] = AddStaticVehicle(525,1897.2646,-1852.4352,13.7077,90.2574,17,20); //

public OnPlayerStateChange(playerid, newstate, oldstate)
{
    new vid;
    new Float:X, Float:Y, Float:Z, Float:Angle;
    GetPlayerPos(playerid,X,Y,Z);
    GetPlayerFacingAngle(playerid,Angle);
    vid = GetPlayerVehicleID(playerid);
    if(oldstate != PLAYER_STATE_DRIVER && newstate == PLAYER_STATE_DRIVER) // Player entered a vehicle as a driver
    {
        if(Mechanic[playerid] == 1) return 1; // if the player is mechanic then return 1 If not then check player's vehicle
        else
        {
            for(new i = 0; i< 5; i++)
            {
                if(vid == mech_vehicle[i])
                { 
     		    SetPlayerPos(playerid,X,Y,Z+3);
     		    SetPlayerFacingAngle(playerid,Angle);
		    SendClientMessage(playerid, 0xFFFFFFFF, "This vehicle is only for Mechanics");
                }
            }
        }
    }
    return 1;
}
I did that and got 4 errors.

Код HTML:
C:\Users\Zach\Desktop\Folders\Servers\SAMP\SamZach\gamemodes\rp.pwn(878) : error 017: undefined symbol "mech_vehicle"
C:\Users\Zach\Desktop\Folders\Servers\SAMP\SamZach\gamemodes\rp.pwn(878) : warning 215: expression has no effect
C:\Users\Zach\Desktop\Folders\Servers\SAMP\SamZach\gamemodes\rp.pwn(878) : error 001: expected token: ";", but found "]"
C:\Users\Zach\Desktop\Folders\Servers\SAMP\SamZach\gamemodes\rp.pwn(878) : error 029: invalid expression, assumed zero
C:\Users\Zach\Desktop\Folders\Servers\SAMP\SamZach\gamemodes\rp.pwn(878) : fatal error 107: too many error messages on one line
Reply


Messages In This Thread
Help - by ZachKnoxx - 31.05.2015, 21:45
Re: Help - by SoFahim - 01.06.2015, 06:00
Re: Help - by fuckingcruse - 01.06.2015, 07:51
Re: Help - by rainbowPUKE - 01.06.2015, 10:59
Re: Help - by muzammilfreeman - 01.06.2015, 11:06
Re: Help - by VishvaJeet - 01.06.2015, 11:14
Re: Help - by Bennyy - 01.06.2015, 12:59
Re: Help - by PepsiCola23 - 01.06.2015, 14:44
Re: Help - by ZachKnoxx - 01.06.2015, 21:29
Re: Help - by SoFahim - 02.06.2015, 05:55

Forum Jump:


Users browsing this thread: 1 Guest(s)