2.
Motor beindítása/lállítása
if(strcmp(cmd, \"/startengine\",true) == 0) {
new vid = GetPlayerVehicleID(playerid);
if(vid != INVALID_VEHICLE_ID) {
GetVehicleParamsEx(vid,engine,lights,alarm,doors,bonnet,boot,objective);
SetVehicleParamsEx(vid,VEHICLE_PARAMS_ON,lights,alarm,doors,bonnet,boot,objective);
}
return 1;
}
if(strcmp(cmd, \"/stopengine\",true) == 0) {
new vid = GetPlayerVehicleID(playerid);
if(vid != INVALID_VEHICLE_ID) {
GetVehicleParamsEx(vid,engine,lights,alarm,doors,bonnet,boot,objective);
SetVehicleParamsEx(vid,VEHICLE_PARAMS_OFF,lights,alarm,doors,bonnet,boot,objective);
}
return 1;
}
Motor háztetõ felnyitása/lecsukása
if(strcmp(cmd, \"/openboot\",true) == 0) {
new vid = GetPlayerVehicleID(playerid);
if(vid != INVALID_VEHICLE_ID) {
GetVehicleParamsEx(vid,engine,lights,alarm,doors,bonnet,boot,objective);
SetVehicleParamsEx(vid,engine,lights,alarm,doors,bonnet,VEHICLE_PARAMS_ON,objective);
}
return 1;
}
if(strcmp(cmd, \"/closeboot\",true) == 0) {
new vid = GetPlayerVehicleID(playerid);
if(vid != INVALID_VEHICLE_ID) {
GetVehicleParamsEx(vid,engine,lights,alarm,doors,bonnet,boot,objective);
SetVehicleParamsEx(vid,engine,lights,alarm,doors,bonnet,VEHICLE_PARAMS_OFF,objective);
}
return 1;
}
Csomagtartófelnyitása/lezárása
if(strcmp(cmd, \"/openbonnet\",true) == 0) {
new vid = GetPlayerVehicleID(playerid);
if(vid != INVALID_VEHICLE_ID) {
GetVehicleParamsEx(vid,engine,lights,alarm,doors,bonnet,boot,objective);
SetVehicleParamsEx(vid,engine,lights,alarm,doors,VEHICLE_PARAMS_ON,boot,objective);
}
return 1;
}
if(strcmp(cmd, \"/closebonnet\",true) == 0) {
new vid = GetPlayerVehicleID(playerid);
if(vid != INVALID_VEHICLE_ID) {
GetVehicleParamsEx(vid,engine,lights,alarm,doors,bonnet,boot,objective);
SetVehicleParamsEx(vid,engine,lights,alarm,doors,VEHICLE_PARAMS_OFF,boot,objective);
}
return 1;
}
Riasztó ki/bekapcsolása
if(strcmp(cmd, \"/alarmon\",true) == 0) {
new vid = GetPlayerVehicleID(playerid);
if(vid != INVALID_VEHICLE_ID) {
GetVehicleParamsEx(vid,engine,lights,alarm,doors,bonnet,boot,objective);
SetVehicleParamsEx(vid,engine,lights,VEHICLE_PARAMS_ON,doors,bonnet,boot,objective);
}
return 1;
}
if(strcmp(cmd, \"/alarmoff\",true) == 0) {
new vid = GetPlayerVehicleID(playerid);
if(vid != INVALID_VEHICLE_ID) {
GetVehicleParamsEx(vid,engine,lights,alarm,doors,bonnet,boot,objective);
SetVehicleParamsEx(vid,engine,lights,VEHICLE_PARAMS_OFF,doors,bonnet,boot,objective);
}
return 1;
}
Lámpát be/kikapcsolja
if(strcmp(cmd, \"/lightson\",true) == 0) {
new vid = GetPlayerVehicleID(playerid);
if(vid != INVALID_VEHICLE_ID) {
GetVehicleParamsEx(vid,engine,lights,alarm,doors,bonnet,boot,objective);
SetVehicleParamsEx(vid,engine,VEHICLE_PARAMS_ON,alarm,doors,bonnet,boot,objective);
}
return 1;
}
if(strcmp(cmd, \"/lightsoff\",true) == 0) {
new vid = GetPlayerVehicleID(playerid);
if(vid != INVALID_VEHICLE_ID) {
GetVehicleParamsEx(vid,engine,lights,alarm,doors,bonnet,boot,objective);
SetVehicleParamsEx(vid,engine,VEHICLE_PARAMS_OFF,alarm,doors,bonnet,boot,objective);
}
return 1;
}
Bennevan a filterscript/test_cmds.pwn-be
szóval nem én készítettem :angel:
ja és kell hozzá
ez:
new engine,lights,alarm,doors,bonnet,boot;