OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
{
if(!ispassenger)
{
if(vehicleid == 579)
{
if(!IsPlayerAdmin(playerid)
{
SendClientMessage(playerid, -1, "Huntley can be driven only by admin.");
ClearAnimations(playerid);
return 1;
}
}
}
}
pawn Код:
|
public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
{
if(!ispassenger)
{
if(vehicleid == 579)
{
if(!IsPlayerAdmin(playerid)
{
SendClientMessage(playerid, -1, "Huntley can be driven only by admin.");
ClearAnimations(playerid);
return 1;
}
}
}
}
C:\Users\Vio\Desktop\nothing.pwn(106) : error 001: expected token: ")", but found "{"
C:\Users\Vio\Desktop\nothing.pwn(113) : warning 209: function "OnPlayerEnterVehicle" should return a value
Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase
1 Error.
public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
{
if(ispassenger == 0)
{
if(vehicleid == 579)
{
if(!IsPlayerAdmin(playerid)
{
SendClientMessage(playerid, -1, "Huntley can be driven only by admin.");
ClearAnimations(playerid);
}
}
}
return 1;
}
public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
{
if(!ispassenger == 0)
{
if(vehicleid == 579)
{
if(!IsPlayerAdmin(playerid)
{
SendClientMessage(playerid, -1, "Huntley can be driven only by admin.");
ClearAnimations(playerid);
}
}
}
return 1;
}
C:\Users\Vio\Desktop\nothing.pwn(101) : warning 213: tag mismatch
C:\Users\Vio\Desktop\nothing.pwn(106) : error 001: expected token: ")", but found "{"
Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase
1 Error.
RemovePlayerFromVehicle wouldn't work in this callback, as this is called right away when player presses enter near a vehicle (at least it used to be called then), so you have to clear the entering animation, and the player can't enter.
|