01.03.2013, 12:27
gactually u didnt understood what i mean tthere e.e
pawn Код:
//-- top of script add under includes
new pVehicleSpawned[MAX_PLAYERS];
//------
//in onplayerconnect add this:
pVehicleSpawned[playerid] = -1;
//-------
if(listid == vehlist)
{
if(response)
{
if( pVehicleSpawned[playerid] != -1 )
{
for( new i; i < MAX_PLAYERS; i++ )
{
if( IsPlayerInVehicle( i, pVehicleSpawned[playerid] ) DestroyVehicle( pVehicleSpawned[playerid] );
}
}
new Float:pos[3]; GetPlayerPos(playerid, pos[0], pos[1], pos[2]);
pVehicleSpawned[playerid] = CreateVehicle(modelid, pos[0] + 2.5, pos[1], pos[2] + 2.5, 0.0, random(128), random(128), -1);
}
else
{
return 0;
}