Changing filterscripts
#3

You could do:
pawn Код:
#include <a_samp>

enum e_SPAWN_POINTS
{
    Float:e_fX,
    Float:e_fY,
    Float:e_fZ,
    Float:e_fRot
};

new const g_SpawnPoints[ ][ e_SPAWN_POINTS ] = {
    //  x      y      z     rotation
    { 123.0, 456.0, 789.0, 0.0 },
    { 123.0, 456.0, 789.0, 0.0 },
    { 123.0, 456.0, 789.0, 0.0 },
    { 123.0, 456.0, 789.0, 0.0 },
    { 123.0, 456.0, 789.0, 0.0 },
    { 123.0, 456.0, 789.0, 0.0 },
    { 123.0, 456.0, 789.0, 0.0 },
    { 123.0, 456.0, 789.0, 0.0 },
    { 123.0, 456.0, 789.0, 0.0 }
};

new g_iSpawnPoint = 0;

public OnGameModeInit( )
{
    SetTimer( "UpdateSpawnPoint", 6 * 60 * 1000, true );
}

forward UpdateSpawnPoint( );
public  UpdateSpawnPoint( )
    g_iSpawnPoint = ( g_iSpawnPoint + 1 ) % sizeof( g_SpawnPoints );

public OnPlayerSpawn( playerid )
{
    SetPlayerPos( playerid, g_SpawnPoints[ g_iSpawnPoint ][ e_fX ], g_SpawnPoints[ g_iSpawnPoint ][ e_fY ], g_SpawnPoints[ g_iSpawnPoint ][ e_fZ ] );
    SetPlayerFacingAngle( playerid, g_SpawnPoints[ g_iSpawnPoint ][ e_fRot ] );
}
Reply


Messages In This Thread
Changing filterscripts - by Baboon - 25.11.2010, 12:46
Re: Changing filterscripts - by Zh3r0 - 25.11.2010, 13:15
Re: Changing filterscripts - by Slice - 25.11.2010, 13:23
Re: Changing filterscripts - by Baboon - 25.11.2010, 13:30
Re: Changing filterscripts - by Zh3r0 - 25.11.2010, 14:15
Re: Changing filterscripts - by Baboon - 25.11.2010, 14:20
Re: Changing filterscripts - by Slice - 25.11.2010, 14:25
Re: Changing filterscripts - by Baboon - 25.11.2010, 14:42
Re: Changing filterscripts - by Zh3r0 - 25.11.2010, 14:45
AW: Changing filterscripts - by Cank - 25.11.2010, 15:12

Forum Jump:


Users browsing this thread: 1 Guest(s)