if(strcmp(cmdtext,"/motor",true) == 0)
{
new Float:vx, Float:vy, Float:vz;
new vehicleid = GetPlayerVehicleID(playerid);
GetVehiclePos(vehicleid,vx,vy,vz);
if(GetPlayerState(playerid) == PLAYER_STATE_DRIVER)
{
new motor,licht,alarm,ture,motorhaube,kofferraum,objective;
GetVehicleParamsEx(vehicleid,motor,licht,alarm,ture,motorhaube,kofferraum,objective);
if(motor == 0)
{
SetVehicleParamsEx(vehicleid,VEHICLE_PARAMS_ON,licht,alarm,ture,motorhaube,kofferraum,objective);
GameTextForPlayer(playerid,"~w~Motor ~g~angeschaltet",1000,6);
}
else
{
SetVehicleParamsEx(vehicleid,VEHICLE_PARAMS_OFF,licht,alarm,ture,motorhaube,kofferraum,objective);
GameTextForPlayer(playerid,"~w~Motor ~r~abgeschaltet",1000,6);
}
}
return 1;
}
Und bei mir klappt alles perfekt^^