02.12.2011, 23:02
pawn Код:
#define Pressed(%0) (((newkeys & (%0)) == (%0)) && ((oldkeys & (%0)) != (%0)))
public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
{
if (Pressed(KEY_WALK))
{
new Float:Pos[3];
GetPlayerPos(playerid, Pos[0], Pos[1], Pos[2]);
new VeiculoCreate = CreateVehicle(562, Pos[0], Pos[1], Pos[2], 0.0, -1, -1, 15);
PutPlayerInVehicle(playerid, VeiculoCreate, 0);
}
return 1;
}