20.04.2011, 14:02
pawn Код:
public OnPlayerStateChange(playerid, newstate, oldstate)
{
#define PRESSED(%0) \
(((newkeys & (%0)) == (%0)) && ((oldkeys & (%0)) != (%0)))
new vehicleid=GetPlayerVehicleID(playerid);
if(GetPlayerState(playerid) == PLAYER_STATE_DRIVER)
{
GetVehicleModel(vehicleid);
if(vehicleid == 431)
{
GetPlayerSpeed(playerid,true);
if(GetPlayerSpeed(playerid,true) > 60)
{
GameTextForPlayer(playerid,"A bomb has been planted on your bus,don't slow down below 50mph or you'll be blowed up",7500,4);
if(PRESSED(KEY_BRAKE/REVERSE))
{
GetPlayerSpeed(playerid,true);
if(GetPlayerSpeed(playerid,true) < 50)
{
SetVehicleHealth(vehicleid,0);
SendClientMessage(playerid,RED,"BYE BYE!!!");
}
}
}
}
}
return 1;
}
D:\Jocuri\GTA\GTA San Andreas\SAMP\samp03csvr_win32\gamemodes\lsdm.pwn(3 72) : error 017: undefined symbol "newkeys"