OnPlayerEnterVehicle
#1

Solved


Код:
public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
{
    if (vehicleid == 562)
    {
        AddVehicleComponent(562, 1010); // Nitro
        SendClientMessage(playerid, 0xFFFFFFAA, "Nitro Added.");

	return 1;
}
Код:
C:\DOCUME~1\Barteka\Desktop\SA-MPS~1\GAMEMO~1\NOSSDR~1.PWN(241) : warning 217: loose indentation
C:\DOCUME~1\Barteka\Desktop\SA-MPS~1\GAMEMO~1\NOSSDR~1.PWN(244) : warning 217: loose indentation
C:\DOCUME~1\Barteka\Desktop\SA-MPS~1\GAMEMO~1\NOSSDR~1.PWN(244) : error 029: invalid expression, assumed zero
C:\DOCUME~1\Barteka\Desktop\SA-MPS~1\GAMEMO~1\NOSSDR~1.PWN(244) : error 004: function "OnPlayerExitVehicle" is not implemented
C:\DOCUME~1\Barteka\Desktop\SA-MPS~1\GAMEMO~1\NOSSDR~1.PWN(249) : warning 225: unreachable code
C:\DOCUME~1\Barteka\Desktop\SA-MPS~1\GAMEMO~1\NOSSDR~1.PWN(249) : error 029: invalid expression, assumed zero
C:\DOCUME~1\Barteka\Desktop\SA-MPS~1\GAMEMO~1\NOSSDR~1.PWN(249) : error 004: function "OnPlayerStateChange" is not implemented
C:\DOCUME~1\Barteka\Desktop\SA-MPS~1\GAMEMO~1\NOSSDR~1.PWN(254) : warning 225: unreachable code
C:\DOCUME~1\Barteka\Desktop\SA-MPS~1\GAMEMO~1\NOSSDR~1.PWN(254) : error 029: invalid expression, assumed zero
C:\DOCUME~1\Barteka\Desktop\SA-MPS~1\GAMEMO~1\NOSSDR~1.PWN(254) : error 004: function "OnPlayerEnterCheckpoint" is not implemented
C:\DOCUME~1\Barteka\Desktop\SA-MPS~1\GAMEMO~1\NOSSDR~1.PWN(259) : warning 225: unreachable code
C:\DOCUME~1\Barteka\Desktop\SA-MPS~1\GAMEMO~1\NOSSDR~1.PWN(259) : error 029: invalid expression, assumed zero
C:\DOCUME~1\Barteka\Desktop\SA-MPS~1\GAMEMO~1\NOSSDR~1.PWN(259) : error 004: function "OnPlayerLeaveCheckpoint" is not implemented
C:\DOCUME~1\Barteka\Desktop\SA-MPS~1\GAMEMO~1\NOSSDR~1.PWN(264) : warning 225: unreachable code
C:\DOCUME~1\Barteka\Desktop\SA-MPS~1\GAMEMO~1\NOSSDR~1.PWN(264) : error 029: invalid expression, assumed zero
C:\DOCUME~1\Barteka\Desktop\SA-MPS~1\GAMEMO~1\NOSSDR~1.PWN(264) : error 004: function "OnPlayerEnterRaceCheckpoint" is not implemented
C:\DOCUME~1\Barteka\Desktop\SA-MPS~1\GAMEMO~1\NOSSDR~1.PWN(269) : warning 225: unreachable code
C:\DOCUME~1\Barteka\Desktop\SA-MPS~1\GAMEMO~1\NOSSDR~1.PWN(269) : error 029: invalid expression, assumed zero
Thanks for reading.
Reply
#2

The problem seems obvious, you are missing a bracket, can you not see that?

pawn Код:
public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
{
    if (vehicleid == 562)
    {
        AddVehicleComponent(562, 1010); // Nitro
        SendClientMessage(playerid, 0xFFFFFFAA, "Nitro Added.");
    }
    return 1;
}
Reply
#3

Quote:
Originally Posted by JaTochNietDan
Посмотреть сообщение
The problem seems obvious, you are missing a bracket, can you not see that?

pawn Код:
public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
{
    if (vehicleid == 562)
    {
        AddVehicleComponent(562, 1010); // Nitro
        SendClientMessage(playerid, 0xFFFFFFAA, "Nitro Added.");
    }
    return 1;
}
This wont work! OnPlayerEnterVehicle is called ONLY when you press intro to enter a car, not when your in it!
So use OnPlayerStateChange.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)