How to do it?
#4

Quote:
Originally Posted by Hansrutger
Посмотреть сообщение
You are doing correct if you want VW to be an integer. :P

Код:
enum myEnum
{
    Float:fuel,
    vehWindow
}
new myVehEnum[maxVehicles][myEnum];
I read that you can add so vehWindow is a boolean by "bool:" tag just like with float but I would prefer integer as I might want to change the stances in a vehicle's window to be half-up maybe? Then with a bool I only have true or false to choose from, therefore I always use integers for objects that can have more than two behaviors.

Suggestion: If I were to be connect with your script in the future, I'd like to know what each attribute means without having to look at where you declared them, as in your "Float:F" doesn't really mean that it has to be fuel. Therefore to make the script readable, I suggest you change "F" to like "vehFuel" or "fuel" just to make it easier for people that will read the script and for yourself! Having lots of different attributes may make you confused later on once you have not used the enum for a while. :P Just a tip though.
Thank you, you was really helpful but one more question I'm about to script "windows system" so if windows will be closed and players will talk in car only they will see the message if windows will be open I will add PROXDETECTOR so other ppl will be able to see chat also..

How can I do that?

I tried something like this:
pawn Код:
public OnPlayerText(playerid, text[])
{
    if(IsPlayerInAnyVehicle(playerid))
    {
        if(VW[GetPlayerVehicleID(playerid)] == 0) // VW = Vehicle Windows, this veriable will be replaced later..
        {
            return 1;
        }
    }
    return 1;
}
Umm I need to add loop here or smth ?
Thanks for help in advance
Reply


Messages In This Thread
How to do it? - by Lajko1 - 22.01.2014, 12:45
Re: How to do it? - by Hansrutger - 22.01.2014, 12:50
Re: How to do it? - by [TMS]Legena - 22.01.2014, 12:50
Re: How to do it? - by Lajko1 - 22.01.2014, 14:17
Re: How to do it? - by Hansrutger - 22.01.2014, 15:50
Re: How to do it? - by Lajko1 - 22.01.2014, 15:56
Re: How to do it? - by Hansrutger - 22.01.2014, 16:01
Re: How to do it? - by Lajko1 - 22.01.2014, 16:56
Re: How to do it? - by Lajko1 - 22.01.2014, 17:35
Re: How to do it? - by Lajko1 - 23.01.2014, 10:29

Forum Jump:


Users browsing this thread: 1 Guest(s)