13.11.2013, 18:27
Any callback MUST be outside of any other.
You already have OnPlayerKeyStateChange callback to your script. Just goto that callback (Ctrl + F and type: OnPlayerKeyStateChange) and add inside it:
You already have OnPlayerKeyStateChange callback to your script. Just goto that callback (Ctrl + F and type: OnPlayerKeyStateChange) and add inside it:
pawn Код:
// ...
if( ( newkeys & KEY_SPRINT) && !( oldkeys & KEY_SPRINT ) )
{
if( GetPlayerState( playerid ) == PLAYER_STATE_ONFOOT )
{
new Float:shax, Float:shay, Float:shaz;
new Float:shbx, Float:shby, Float:shbz;
new Float:shcx, Float:shcy, Float:shcz;
GetVehiclePos(EnterableShamals[0], shax, shay, shaz);
GetVehiclePos(EnterableShamals[1], shbx, shby, shbz);
GetVehiclePos(EnterableShamals[2], shcx, shcy, shcz);
for(new i = 0; i < sizeof(HouseInfo); i++)
{
// rest of the code of the /enter command
}
}
}