Vehicle spawn zone -
jaksimaksi - 12.08.2010
Hi i have a vehicle spawning system but i want to create a zone where they can spawn those...
How can i make that zone?
Re: Vehicle spawn zone -
0ne - 12.08.2010
get the Max X,Y; Min X,Y and do:
pawn Код:
//somewhere on the command or whatever:
...
.....
...
if(IsPlayerInArea(coordinates))
{
code
}
else
{
return SendClientMessage(playerid,YOUR_COLOR,"Sorry, but you are not in the vehicle spawning zone.");
}
rest of the code?
return 1;
}
Re: Vehicle spawn zone -
jaksimaksi - 12.08.2010
could someone generate coordinates? cuz i dont know the isplayerinarea configuration. thx
Код:
dcmd_car(playerid,params[])
{
#pragma unused params
IsPlayerInArea(playerid, coordinates);
if ( GetPlayerState( playerid ) == PLAYER_STATE_DRIVER )
{
#if !defined IGNORE_VEHICLE_ACTIVATION
ShowPlayerDefaultDialog( playerid );
return 1;
#endif
}
else
{
return SendClientMessage(playerid,COLOR_RED,"Sorry, but you are not in the vehicle spawning zone.");
}
if ( GetPlayerState( playerid ) != PLAYER_STATE_PASSENGER ) ShowPlayerDefaultDialog( playerid ); // and i get warning here : warning 225: unreachable code
return 1;
}
coordinates
-543.5457,2546.2039,53.5156,356.4182,0,0,0,0,0,0); // 3 --------><---------- -541.3602,2639.6777,53.5156,302.6496,0,0,0,0,0,0); // 4
-506.5322,2546.4592,53.5156,175.3958,0,0,0,0,0,0); // 2 -----------> <----------- -504.1658,2640.1458,53.5156,155.0916,0,0,0,0,0,0); // 1
Re: Vehicle spawn zone -
Vince - 12.08.2010
http://forum.sa-mp.com/search.php
Re: Vehicle spawn zone -
jaksimaksi - 12.08.2010
i know where to find search so gtfo with your dumb post, people who knows please help me ..
Re: Vehicle spawn zone -
jaksimaksi - 12.08.2010
im pissed off... trying but still getting shits.. here the coordinates :
-543.5457,2546.2039,53.5156,356.4182,0,0,0,0,0,0); // 3 --------><---------- -541.3602,2639.6777,53.5156,302.6496,0,0,0,0,0,0); // 4
-506.5322,2546.4592,53.5156,175.3958,0,0,0,0,0,0); // 2 -----------> <----------- -504.1658,2640.1458,53.5156,155.0916,0,0,0,0,0,0); // 1
the car command..:
Код:
dcmd_car(playerid,params[])
{
#pragma unused params
if ( GetPlayerState( playerid ) == PLAYER_STATE_DRIVER )
{
#if !defined IGNORE_VEHICLE_ACTIVATION
{
ShowPlayerDefaultDialog( playerid );
return 1;
#endif
}
}
if ( GetPlayerState( playerid ) != PLAYER_STATE_PASSENGER ) ShowPlayerDefaultDialog( playerid );
return 1;
}
PLEASE generate that god damn code with is playerinarea...
Re: Vehicle spawn zone -
jaksimaksi - 12.08.2010
Код:
dcmd_car(playerid,params[])
{
#pragma unused params
if ( GetPlayerState( playerid ) == PLAYER_STATE_DRIVER )
{
#if !defined IGNORE_VEHICLE_ACTIVATION
{
for(new i = 0; i < MAX_PLAYERS; i++)
if(IsPlayerInArea(i, -543.5457, 2640.1458, -504.1658, 2546.2039))
ShowPlayerDefaultDialog( playerid );
else
{
return SendClientMessage(playerid,COLOR_RED,"Sorry, but you are not in the vehicle spawning zone.");
}
return 1;
#endif
}
}
if ( GetPlayerState( playerid ) != PLAYER_STATE_PASSENGER ) ShowPlayerDefaultDialog( playerid );
return 1;
}
i added correct coordinates but i can spawn car in all map. whats wrong?