23.01.2010, 18:30
pawn Код:
forward CarHop(playerid); // On Top of your script
pawn Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
if(strcmp(cmdtext, "/carhop", true) == 0)
{
if(IsPlayerInAnyVehicle(playerid))
{
SetVehicleVelocity(GetPlayerVehicleID(playerid), 0, 0, 5.0);
SetTimer("CarHop", 5000, 1);
return 1;
}
}
else
{
SendClientMessage(playerid, 0xFFFFF, "You are not in a vehicle");
return 1;
}
return 0;
}
pawn Код:
public CarHop(playerid) // Put somewhere in your script
{
SetVehicleVelocity(GetPlayerVehicleID(playerid), 0, 0, 5.0);
return 1;
}