16.03.2010, 05:47
Quote:
|
Originally Posted by sean5874
I remade an piece by using your advice, if im in a car, and that car dont move, everything is fine. The car dont go in cruise control, cuz the speed is 0. But when i go for a trip, and i do /cc (my cruise control command) the whole server crashes! Below you see my piece of script:
Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
if (strcmp("/cc", cmdtext, true, 10) == 0)
{
new Float:vX, vY, vZ;
GetVehicleVelocity(GetPlayerVehicleID(playerid), vX, vY, vZ);
SetVehicleVelocity(GetPlayerVehicleID(playerid), vX, vY, 0.0); // im not using vZ
SendClientMessage(playerid, COLOR_RED,"CRUISE CONTROL: Cc is on, use key S to turn it off.");
return 1;
}
return 0;
}
|

