Would you like to react to this message? Create an account in a few clicks or log in to continue.


Welcome to our official forums, we provide weekly streaming of premium WWE content, and have a Marketplace for general Accounts/Keys/Items.


You are not connected. Please login or register

Simple Engine System

+2
Mickey227
Redbull
6 posters

Go down  Message [Page 1 of 1]

1Simple Engine System Empty Simple Engine System Thu Nov 01, 2012 2:24 am

Redbull

Redbull
Admin

Engine system, for beginner scripters/gamemode developers



Code:
CMD:engine(playerid, params[])
{
        new vehicleid = GetPlayerVehicleID(playerid);
        if(!IsPlayerInAnyVehicle(playerid)) return SendClientMessage(playerid, COLOR_RED, "You need to be in a vehicle to use this command");
        if(vehEngine[vehicleid] == 0)
        {
            vehEngine[vehicleid] = 2;
            SetTimerEx("StartEngine", 3000, 0, "i", playerid);
            SendClientMessage(playerid, COLOR_GREEN, "Vehicle engine starting");
        }
        else if(vehEngine[vehicleid] == 1)
        {
            vehEngine[vehicleid] = 0;
            TogglePlayerControllable(playerid, 0);
            SendClientMessage(playerid, COLOR_GOLD, "Vehicle engine stopped");
            SendClientMessage(playerid, COLOR_GOLD, "To re-start the vehicle's engine press \"Shift\" or type \"/engine\"");
        }
        return 1;
}

https://eazygaming.forumotion.com

2Simple Engine System Empty Re: Simple Engine System Sat Oct 19, 2013 3:13 pm

Mickey227



Thx man ! Smile Like it ! Very Happy

3Simple Engine System Empty Re: Simple Engine System Sun Oct 20, 2013 4:39 pm

Anon123



Simple but nice, thanks!

4Simple Engine System Empty Re: Simple Engine System Sun Oct 20, 2013 4:40 pm

Blast3r



SendClientMessage(playerid, COLOR_GOLD, "To re-start the vehicle's engine press \"Shift\" or type \"/engine\"");

Is that copied from somewhere? Because you didn't actually add the OnPlayerKeyState code for the shift key -.-

EDIT: you also didn't define the "vehEngine[MAX_VEHICLES]"

5Simple Engine System Empty Woah. Tue Oct 22, 2013 11:55 am

Spanker



Thanks!

6Simple Engine System Empty Re: Simple Engine System Sat Mar 29, 2014 1:24 pm

Rolux



Useful for RP

Sponsored content



Back to top  Message [Page 1 of 1]

Permissions in this forum:
You cannot reply to topics in this forum