27.01.2015, 16:20
Hello, im wondering if you could use a switch for something like IsPlayerInVehicle, or IsPlayerInDynamicArea (from Incognito's streamer)
Here's a code of what i mean with IsPlayerInDynamicArea:
As you can see, im using "if"'s to check each of these, and i think it would be much quicker using a switch, but im not sure how, for checking different areas?
This doesn't work, but just an example if you still don't understand.
This would kinda be what i want.
Here's a code of what i mean with IsPlayerInDynamicArea:
pawn Код:
if(IsPlayerInDynamicArea(i, LosSantos))
{
// Codes
}
else if(IsPlayerInDynamicArea(i, SanFierro))
{
// Codes
}
else if(IsPlayerInDynamicArea(i, LasVenturas))
{
// Codes
}
This doesn't work, but just an example if you still don't understand.
pawn Код:
switch(IsPlayerInDynamicArea(i))
{
case LosSantos:
{
// Codes
}
case SanFierro:
{
// Codes
}
case LasVenturas:
{
// Codes
}
}