23.01.2010, 17:42
Can anyone please make a code for me so my vehicle hops into the sky?
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;
}
forward CarHop(playerid); // On Top of your script
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;
}
public CarHop(playerid) // Put somewhere in your script
{
SetVehicleVelocity(GetPlayerVehicleID(playerid), 0, 0, 5.0);
return 1;
}
Originally Posted by <Krys>
pawn Код:
pawn Код:
pawn Код:
|