23.01.2010, 17:50
pawn Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
if(strcmp(cmdtext, "/carhop", true) == 0)
{
if(IsPlayerInAnyVehicle(playerid))
{
new Float:X, Float:Y, Float:Z;
GetVehicleVelocity(GetPlayerVehicleID(playerid), X,Y,Z);
SetVehicleVelocity(GetPlayerVehicleID(playerid), X,Y,Z+10);
return 1;
}
}
else
{
SendClientMessage(playerid, 0xFFFFF, "You are not in a vehicle");
return 1;
}
return 0;
}