SA-MP Forums Archive
Gates,Trunks,Hood - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Gates,Trunks,Hood (/showthread.php?tid=270963)



Gates,Trunks,Hood - James_Bourne - 22.07.2011

Hai,
Well i want script for Raven's Roleplay i mean Gates For Gang's so no one can get in their HQ's with out a Helicopter.

and /trunk so the trunk opens
and /hood so the front of vehicle opens.

Please help me with those things.


Re: Gates,Trunks,Hood - Toreno - 22.07.2011

About the gate, simply create one and learn how to move an object, there are planty of tutorials.

Try these /hood and /trunk commands;
pawn Код:
new engine,lights,alarm,doors,bonnet,boot,objective;
   
public OnPlayerCommandText(playerid, cmdtext[]) {
    if(strcmp("/hood", cmdtext, true, 10) == 0) {
        new vehicleid = GetPlayerVehicleID(playerid);
        GetVehicleParamsEx(vehicleid, engine, lights, alarm, doors, bonnet, boot, objective);
        if(vid != INVALID_VEHICLE_ID) {
            if(bonnet == VEHICLE_PARAMS_ON) SetVehicleParamsEx(vehicleid, engine, lights, alarm, doors, VEHICLE_PARAMS_OFF, boot, objective);
            else if(bonnet == VEHICLE_PARAMS_OFF) SetVehicleParamsEx(vehicleid, engine, lights, alarm, doors, VEHICLE_PARAMS_ON, boot, objective);
        }
        return 1;
    }
    if(strcmp("/trunk", cmdtext, true, 10) == 0) {
        new vehicleid = GetPlayerVehicleID(playerid);
        GetVehicleParamsEx(vehicleid, engine, lights, alarm, doors, bonnet, boot, objective);
        if(vid != INVALID_VEHICLE_ID) {
            if(boot == VEHICLE_PARAMS_ON) SetVehicleParamsEx(vehicleid, engine, lights, alarm, doors, bonnet, VEHICLE_PARAMS_OFF, objective);
            else if(boot == VEHICLE_PARAMS_OFF) SetVehicleParamsEx(vehicleid, engine, lights, alarm, doors, bonnet, VEHICLE_PARAMS_ON, objective);
        }
        return 1;
    }
    return 0;
}



Re: Gates,Trunks,Hood - James_Bourne - 22.07.2011

Can u send me tutorials of Gates? and where do i put those /hood and /trunk scripts


Re: Gates,Trunks,Hood - Toreno - 22.07.2011

Here is a tutorial;
https://sampforum.blast.hk/showthread.php?tid=228465

These commands are already inside OnPlayerCommandText public, you need to grab these two commands without the public itself and post them into your own OnPlayerCommandText, which is in your game mode.


Re: Gates,Trunks,Hood - James_Bourne - 22.07.2011

I Don't really understand what you mean is it in the LARP?? and the gate is it in larp too?


Re: Gates,Trunks,Hood - Toreno - 22.07.2011

I didn't say a word about LA-RP, what is wrong with you? :O


Re: Gates,Trunks,Hood - Sensitive - 22.07.2011

Raven's RP sucks alot.
It is worse script i have ever seen, and if your a beginner get Godfather or LARP instead.
Alot easier to understand and learn.

For gates - It works for both, you don't need tutorial for Raven's.


Re: Gates,Trunks,Hood - James_Bourne - 22.07.2011

Dude in my game mode it is LARP and Rivershell where do i put those script omg which files lol!


Re: Gates,Trunks,Hood - Kenka - 22.07.2011

Learn something before making your server..


Re: Gates,Trunks,Hood - miley1 - 15.05.2012

Quote:
Originally Posted by Toreno
Посмотреть сообщение
About the gate, simply create one and learn how to move an object, there are planty of tutorials.

Try these /hood and /trunk commands;
pawn Код:
new engine,lights,alarm,doors,bonnet,boot,objective;
   
public OnPlayerCommandText(playerid, cmdtext[]) {
    if(strcmp("/hood", cmdtext, true, 10) == 0) {
        new vehicleid = GetPlayerVehicleID(playerid);
        GetVehicleParamsEx(vehicleid, engine, lights, alarm, doors, bonnet, boot, objective);
        if(vid != INVALID_VEHICLE_ID) {
            if(bonnet == VEHICLE_PARAMS_ON) SetVehicleParamsEx(vehicleid, engine, lights, alarm, doors, VEHICLE_PARAMS_OFF, boot, objective);
            else if(bonnet == VEHICLE_PARAMS_OFF) SetVehicleParamsEx(vehicleid, engine, lights, alarm, doors, VEHICLE_PARAMS_ON, boot, objective);
        }
        return 1;
    }
    if(strcmp("/trunk", cmdtext, true, 10) == 0) {
        new vehicleid = GetPlayerVehicleID(playerid);
        GetVehicleParamsEx(vehicleid, engine, lights, alarm, doors, bonnet, boot, objective);
        if(vid != INVALID_VEHICLE_ID) {
            if(boot == VEHICLE_PARAMS_ON) SetVehicleParamsEx(vehicleid, engine, lights, alarm, doors, bonnet, VEHICLE_PARAMS_OFF, objective);
            else if(boot == VEHICLE_PARAMS_OFF) SetVehicleParamsEx(vehicleid, engine, lights, alarm, doors, bonnet, VEHICLE_PARAMS_ON, objective);
        }
        return 1;
    }
    return 0;
}
mind to put this on Pastebin ?