30.03.2011, 00:19
Hi, can someone please put these commands together for me? please, i dont know how to do it, and i would be grateful if you could plzzz
Put:
{
//This will start your engine!
if(strcmp(cmd, "/lightsonn",true) == 0) {
new vid = GetPlayerVehicleID(playerid);
if(vid != INVALID_VEHICLE_ID) {
GetVehicleParamsEx(vid,engine,lights,alarm,doors,b onnet,boot,objective);
// ||||||
SetVehicleParamsEx(vid,engine,VEHICLE_PARAMS_ON,al arm,doors,bonnet,boot,objective);
//VEHICLE_PARAMS_ON is used to turn onn the lights.
}
return 1;
}
if(strcmp(cmd, "/lightsoff",true) == 0) {
new vid = GetPlayerVehicleID(playerid);
if(vid != INVALID_VEHICLE_ID) {
GetVehicleParamsEx(vid,engine,lights,alarm,doors,b onnet,boot,objective);
// ||||||
SetVehicleParamsEx(vid,engine,VEHICLE_PARAMS_OFF,a larm,doors,bonnet,boot,objective);
//Here the VEHICLE_PARAMS_OFF will turn off your lights.
}
return 1;
}
if(strcmp(cmd, "/turnonobjective",true) == 0) {
new vid = GetPlayerVehicleID(playerid);
if(vid != INVALID_VEHICLE_ID) {
GetVehicleParamsEx(vid,engine,lights,alarm,doors,b onnet,boot,objective);
SetVehicleParamsEx(vid,engine,lights,alarm,doors,b onnet,boot,VEHICLE_PARAMS_ON);
}
return 1;
}
if(strcmp(cmd, "/turnoffobjective",true) == 0) {
new vid = GetPlayerVehicleID(playerid);
if(vid != INVALID_VEHICLE_ID) {
GetVehicleParamsEx(vid,engine,lights,alarm,doors,b onnet,boot,objective);
SetVehicleParamsEx(vid,engine,lights,alarm,doors,b onnet,boot,VEHICLE_PARAMS_OFF);
}
return 1;
}
if(strcmp(cmd, "/opendoors",true) == 0) {
new vid = GetPlayerVehicleID(playerid);
if(vid != INVALID_VEHICLE_ID) {
GetVehicleParamsEx(vid,engine,lights,alarm,doors,b onnet,boot,objective);
SetVehicleParamsEx(vid,engine,lights,alarm,VEHICLE _PARAMS_ON,bonnet,boot,objective);
}
return 1;
}
if(strcmp(cmd, "/closedoors",true) == 0) {
new vid = GetPlayerVehicleID(playerid);
if(vid != INVALID_VEHICLE_ID) {
GetVehicleParamsEx(vid,engine,lights,alarm,doors,b onnet,boot,objective);
SetVehicleParamsEx(vid,engine,lights,alarm,VEHICLE _PARAMS_OFF,bonnet,boot,objective);
}
return 1;
}
if(strcmp(cmd, "/alarmon",true) == 0) {
new vid = GetPlayerVehicleID(playerid);
if(vid != INVALID_VEHICLE_ID) {
GetVehicleParamsEx(vid,engine,lights,alarm,doors,b onnet,boot,objective);
SetVehicleParamsEx(vid,engine,lights,VEHICLE_PARAM S_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,b onnet,boot,objective);
SetVehicleParamsEx(vid,engine,lights,VEHICLE_PARAM S_OFF,doors,bonnet,boot,objective);
}
return 1;
}
if(strcmp(cmd, "/openbonnet",true) == 0) {
new vid = GetPlayerVehicleID(playerid);
if(vid != INVALID_VEHICLE_ID) {
GetVehicleParamsEx(vid,engine,lights,alarm,doors,b onnet,boot,objective);
SetVehicleParamsEx(vid,engine,lights,alarm,doors,V EHICLE_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,b onnet,boot,objective);
SetVehicleParamsEx(vid,engine,lights,alarm,doors,V EHICLE_PARAMS_OFF,boot,objective);
}
return 1;
}
if(strcmp(cmd, "/openboot",true) == 0) {
new vid = GetPlayerVehicleID(playerid);
if(vid != INVALID_VEHICLE_ID) {
GetVehicleParamsEx(vid,engine,lights,alarm,doors,b onnet,boot,objective);
SetVehicleParamsEx(vid,engine,lights,alarm,doors,b onnet,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,b onnet,boot,objective);
SetVehicleParamsEx(vid,engine,lights,alarm,doors,b onnet,VEHICLE_PARAMS_OFF,objective);
}
return 1;
}
Into this:
{
if(strcmp(cmdtext, "/startengine",true) == 0)
{
new engine,lights,alarm,doors,bonnet,boot,objective;
new vid = GetPlayerVehicleID(playerid);
if(vid != INVALID_VEHICLE_ID)
{
GetVehicleParamsEx(vid,engine,lights,alarm,doors,b onnet,boot,objective);
SetVehicleParamsEx(vid,VEHICLE_PARAMS_ON,lights,al arm,doors,bonnet,boot,objective);
}
return 1;
}
if(strcmp(cmdtext, "/stopengine",true) == 0)
{
new engine,lights,alarm,doors,bonnet,boot,objective;
new vid = GetPlayerVehicleID(playerid);
if(vid != INVALID_VEHICLE_ID)
{
GetVehicleParamsEx(vid,engine,lights,alarm,doors,b onnet,boot,objective);
SetVehicleParamsEx(vid,VEHICLE_PARAMS_OFF,lights,a larm,doors,bonnet,boot,objective);
}
return 1;
}
if(strcmp(cmdtext, "/Teleport", true) == 0)
{
ShowPlayerDialog(playerid, 2, DIALOG_STYLE_LIST, "Teleport Menu", "Unity Station \n Los Santos Police Department", "Select", "Cancel");
return 1;
}
return 0;
}
Put:
{
//This will start your engine!
if(strcmp(cmd, "/lightsonn",true) == 0) {
new vid = GetPlayerVehicleID(playerid);
if(vid != INVALID_VEHICLE_ID) {
GetVehicleParamsEx(vid,engine,lights,alarm,doors,b onnet,boot,objective);
// ||||||
SetVehicleParamsEx(vid,engine,VEHICLE_PARAMS_ON,al arm,doors,bonnet,boot,objective);
//VEHICLE_PARAMS_ON is used to turn onn the lights.
}
return 1;
}
if(strcmp(cmd, "/lightsoff",true) == 0) {
new vid = GetPlayerVehicleID(playerid);
if(vid != INVALID_VEHICLE_ID) {
GetVehicleParamsEx(vid,engine,lights,alarm,doors,b onnet,boot,objective);
// ||||||
SetVehicleParamsEx(vid,engine,VEHICLE_PARAMS_OFF,a larm,doors,bonnet,boot,objective);
//Here the VEHICLE_PARAMS_OFF will turn off your lights.
}
return 1;
}
if(strcmp(cmd, "/turnonobjective",true) == 0) {
new vid = GetPlayerVehicleID(playerid);
if(vid != INVALID_VEHICLE_ID) {
GetVehicleParamsEx(vid,engine,lights,alarm,doors,b onnet,boot,objective);
SetVehicleParamsEx(vid,engine,lights,alarm,doors,b onnet,boot,VEHICLE_PARAMS_ON);
}
return 1;
}
if(strcmp(cmd, "/turnoffobjective",true) == 0) {
new vid = GetPlayerVehicleID(playerid);
if(vid != INVALID_VEHICLE_ID) {
GetVehicleParamsEx(vid,engine,lights,alarm,doors,b onnet,boot,objective);
SetVehicleParamsEx(vid,engine,lights,alarm,doors,b onnet,boot,VEHICLE_PARAMS_OFF);
}
return 1;
}
if(strcmp(cmd, "/opendoors",true) == 0) {
new vid = GetPlayerVehicleID(playerid);
if(vid != INVALID_VEHICLE_ID) {
GetVehicleParamsEx(vid,engine,lights,alarm,doors,b onnet,boot,objective);
SetVehicleParamsEx(vid,engine,lights,alarm,VEHICLE _PARAMS_ON,bonnet,boot,objective);
}
return 1;
}
if(strcmp(cmd, "/closedoors",true) == 0) {
new vid = GetPlayerVehicleID(playerid);
if(vid != INVALID_VEHICLE_ID) {
GetVehicleParamsEx(vid,engine,lights,alarm,doors,b onnet,boot,objective);
SetVehicleParamsEx(vid,engine,lights,alarm,VEHICLE _PARAMS_OFF,bonnet,boot,objective);
}
return 1;
}
if(strcmp(cmd, "/alarmon",true) == 0) {
new vid = GetPlayerVehicleID(playerid);
if(vid != INVALID_VEHICLE_ID) {
GetVehicleParamsEx(vid,engine,lights,alarm,doors,b onnet,boot,objective);
SetVehicleParamsEx(vid,engine,lights,VEHICLE_PARAM S_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,b onnet,boot,objective);
SetVehicleParamsEx(vid,engine,lights,VEHICLE_PARAM S_OFF,doors,bonnet,boot,objective);
}
return 1;
}
if(strcmp(cmd, "/openbonnet",true) == 0) {
new vid = GetPlayerVehicleID(playerid);
if(vid != INVALID_VEHICLE_ID) {
GetVehicleParamsEx(vid,engine,lights,alarm,doors,b onnet,boot,objective);
SetVehicleParamsEx(vid,engine,lights,alarm,doors,V EHICLE_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,b onnet,boot,objective);
SetVehicleParamsEx(vid,engine,lights,alarm,doors,V EHICLE_PARAMS_OFF,boot,objective);
}
return 1;
}
if(strcmp(cmd, "/openboot",true) == 0) {
new vid = GetPlayerVehicleID(playerid);
if(vid != INVALID_VEHICLE_ID) {
GetVehicleParamsEx(vid,engine,lights,alarm,doors,b onnet,boot,objective);
SetVehicleParamsEx(vid,engine,lights,alarm,doors,b onnet,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,b onnet,boot,objective);
SetVehicleParamsEx(vid,engine,lights,alarm,doors,b onnet,VEHICLE_PARAMS_OFF,objective);
}
return 1;
}
Into this:
{
if(strcmp(cmdtext, "/startengine",true) == 0)
{
new engine,lights,alarm,doors,bonnet,boot,objective;
new vid = GetPlayerVehicleID(playerid);
if(vid != INVALID_VEHICLE_ID)
{
GetVehicleParamsEx(vid,engine,lights,alarm,doors,b onnet,boot,objective);
SetVehicleParamsEx(vid,VEHICLE_PARAMS_ON,lights,al arm,doors,bonnet,boot,objective);
}
return 1;
}
if(strcmp(cmdtext, "/stopengine",true) == 0)
{
new engine,lights,alarm,doors,bonnet,boot,objective;
new vid = GetPlayerVehicleID(playerid);
if(vid != INVALID_VEHICLE_ID)
{
GetVehicleParamsEx(vid,engine,lights,alarm,doors,b onnet,boot,objective);
SetVehicleParamsEx(vid,VEHICLE_PARAMS_OFF,lights,a larm,doors,bonnet,boot,objective);
}
return 1;
}
if(strcmp(cmdtext, "/Teleport", true) == 0)
{
ShowPlayerDialog(playerid, 2, DIALOG_STYLE_LIST, "Teleport Menu", "Unity Station \n Los Santos Police Department", "Select", "Cancel");
return 1;
}
return 0;
}