Kod: Dole sve napisano uglavnom kada neko ide /promenispawn i ide bilo koji ostane na 1 spawnu a pise da je promenio
Problem(error/warning): /
Deo skripte: [pawn] }
else {
new rand = random( sizeof( RandomLSSpawn1 ) );
ac_SetPlayerPos( playerid, RandomLSSpawn1[ rand ][ 0 ], RandomLSSpawn1[ rand ][ 1 ], RandomLSSpawn1[ rand ][ 2 ] );
SetPlayerFacingAngle( playerid, RandomLSSpawn1[ rand ][ 3 ] );
SetTimerEx( "SlobodnoSada", 4000, false, "i", playerid );
GameTextForPlayer( playerid, "Ucitavanje...", 1000, 4 );
TogglePlayerControllable( playerid, false );
SetCameraBehindPlayer( playerid );
SetPlayerInterior( playerid, 0 );
PlayerInfo[playerid][ xSpawn ] = SPAWN_OBICAN_LS_1;
}
}
else if( PlayerInfo[playerid][ xSpawn ] == SPAWN_OBICAN_LS_1 ) {
new rand = random( sizeof( RandomLSSpawn1 ) );
ac_SetPlayerPos( playerid, RandomLSSpawn1[ rand ][ 0 ], RandomLSSpawn1[ rand ][ 1 ],RandomLSSpawn1[ rand ][ 2 ] );
SetPlayerFacingAngle( playerid, RandomLSSpawn1[ rand ][ 3 ] );
SetTimerEx( "SlobodnoSada", 4000, false, "i", playerid );
GameTextForPlayer( playerid, "Ucitavanje...", 1000, 4 );
TogglePlayerControllable( playerid, false );
SetCameraBehindPlayer( playerid );
SetPlayerInterior( playerid, 0 );
}
else if( PlayerInfo[playerid][ xSpawn ] == SPAWN_BAZA ) {
ac_SetPlayerPos( playerid, OI[ OrgID ][ oPozIntX ], OI[ OrgID ][ oPozIntY ] , OI[ OrgID ][ oPozIntZ ] );
SetTimerEx( "SlobodnoSada", 4000, false, "i", playerid );
GameTextForPlayer( playerid, "Ucitavanje...", 1000, 4 );
TogglePlayerControllable( playerid, false );
SetCameraBehindPlayer( playerid );
SetPlayerInterior( playerid, OI[ OrgID ][ oInt ] );
SetPlayerVirtualWorld( playerid, OI[ OrgID ][ oVw ] );
inOrgInt[playerid] = OrgID;
}
else if( PlayerInfo[playerid][ xSpawn ] == SPAWN_IMOVINA_1 ) {
if( PlayerInfo[playerid][ xProperty ][ 0 ] != -1 ) {
new i = PlayerInfo[playerid][ xProperty ][ 0 ];
ac_SetPlayerPos( playerid, II[ i ][ iExit ][ 0 ], II[ i ][ iExit ][ 1 ], II[ i ][ iExit ][ 2 ] );
GameTextForPlayer( playerid, "Ucitavanje...", 1000, 4 );
SetTimerEx( "SlobodnoSada", 4000, false, "i", playerid );
SetCameraBehindPlayer( playerid );
TogglePlayerControllable( playerid, false );
SetPlayerInterior( playerid, II[ i ][ iInterior ] );
SetPlayerVirtualWorld( playerid, II[ i ][ iVW ] );
inProperty[playerid] = i;
}
else {
new rand = random( sizeof( RandomLSSpawn1 ) );
ac_SetPlayerPos( playerid, RandomLSSpawn1[ rand ][ 0 ], RandomLSSpawn1[ rand ][ 1 ],RandomLSSpawn1[ rand ][ 2 ] );
SetPlayerFacingAngle( playerid, RandomLSSpawn1[ rand ][ 3 ] );
SetTimerEx( "SlobodnoSada", 4000, false, "i", playerid );
GameTextForPlayer( playerid, "Ucitavanje...", 1000, 4 );
TogglePlayerControllable( playerid, false );
SetCameraBehindPlayer( playerid );
SetPlayerInterior( playerid, 0 );
PlayerInfo[playerid][ xSpawn ] = SPAWN_OBICAN_LS_1;
}
}
else if( PlayerInfo[playerid][ xSpawn ] == SPAWN_IMOVINA_2 ) {
if( PlayerInfo[playerid][ xProperty ][ 1 ] != -1 ) {
new i = PlayerInfo[playerid][ xProperty ][ 1 ];
ac_SetPlayerPos( playerid, II[ i ][ iExit ][ 0 ], II[ i ][ iExit ][ 1 ], II[ i ][ iExit ][ 2 ] );
GameTextForPlayer( playerid, "Ucitavanje...", 1000, 4 );
SetTimerEx( "SlobodnoSada", 4000, false, "i", playerid );
SetCameraBehindPlayer( playerid );
TogglePlayerControllable( playerid, false );
SetPlayerInterior( playerid, II[ i ][ iInterior ] );
SetPlayerVirtualWorld( playerid, II[ i ][ iVW ] );
inProperty[playerid] = i;
}
else {
new rand = random( sizeof( RandomLSSpawn1 ) );
ac_SetPlayerPos( playerid, RandomLSSpawn1[ rand ][ 0 ], RandomLSSpawn1[ rand ][ 1 ],RandomLSSpawn1[ rand ][ 2 ] );
SetPlayerFacingAngle( playerid, RandomLSSpawn1[ rand ][ 3 ] );
SetTimerEx( "SlobodnoSada", 4000, false, "i", playerid );
GameTextForPlayer( playerid, "Ucitavanje...", 1000, 4 );
TogglePlayerControllable( playerid, false );
SetCameraBehindPlayer( playerid );
SetPlayerInterior( playerid, 0 );
PlayerInfo[playerid][ xSpawn ] = SPAWN_OBICAN_LS_1;
}
}
else if( PlayerInfo[playerid][ xSpawn ] == SPAWN_IMOVINA_3 ) {
if( PlayerInfo[playerid][ xProperty ][ 2 ] != -1 ) {
new i = PlayerInfo[playerid][ xProperty ][ 2 ];
ac_SetPlayerPos( playerid, II[ i ][ iExit ][ 0 ], II[ i ][ iExit ][ 1 ], II[ i ][ iExit ][ 2 ] );
GameTextForPlayer( playerid, "Ucitavanje...", 1000, 4 );
SetTimerEx( "SlobodnoSada", 4000, false, "i", playerid );
SetCameraBehindPlayer( playerid );
TogglePlayerControllable( playerid, false );
SetPlayerInterior( playerid, II[ i ][ iInterior ] );
SetPlayerVirtualWorld( playerid, II[ i ][ iVW ] );
inProperty[playerid] = i;
}
else {
new rand = random( sizeof( RandomLSSpawn1 ) );
ac_SetPlayerPos( playerid, RandomLSSpawn1[ rand ][ 0 ], RandomLSSpawn1[ rand ][ 1 ],RandomLSSpawn1[ rand ][ 2 ] );
SetPlayerFacingAngle( playerid, RandomLSSpawn1[ rand ][ 3 ] );
SetTimerEx( "SlobodnoSada", 4000, false, "i", playerid );
GameTextForPlayer( playerid, "Ucitavanje...", 1000, 4 );
TogglePlayerControllable( playerid, false );
SetCameraBehindPlayer( playerid );
SetPlayerInterior( playerid, 0 );
PlayerInfo[playerid][ xSpawn ] = SPAWN_OBICAN_LS_1;
}
}
else if( PlayerInfo[playerid][ xSpawn ] == SPAWN_ALEBAKUCA ) {
ac_SetPlayerPos( playerid, 1292.5704, -832.4692, 1085.6328 );
SetTimerEx( "SlobodnoSada", 4000, false, "i", playerid );
GameTextForPlayer( playerid, "Ucitavanje...", 1000, 4 );
TogglePlayerControllable( playerid, false );
SetCameraBehindPlayer( playerid );
SetPlayerInterior( playerid, 5 );
SetPlayerVirtualWorld( playerid, 0 );
}
else if( PlayerInfo[playerid][ xSpawn ] == SPAWN_OBICAN_LS_2 ) {
new rand = random( sizeof( RandomLSSpawn2 ) );
ac_SetPlayerPos( playerid, 1213.5996, -1747.0599, 13.5946 );
SetPlayerFacingAngle( playerid, RandomLSSpawn2[ rand ][ 3 ] );
SetTimerEx( "SlobodnoSada", 4000, false, "i", playerid );
GameTextForPlayer( playerid, "Ucitavanje...", 1000, 4 );
TogglePlayerControllable( playerid, false );
SetCameraBehindPlayer( playerid );
SetPlayerInterior( playerid, 0 );
}
else if( PlayerInfo[playerid][ xSpawn ] == SPAWN_RENTHOTEL ) {
if( PlayerInfo[playerid][ xHotelRoom ] != -1 ) {
new i = PlayerInfo[playerid][ xHotelRoom ];
if( strcmp( ImeIgraca( playerid ), hotelInfo[ i ][ hGuest_1 ], true ) == 0) {
ac_SetPlayerPos( playerid, 2246.6826, -1160.8252, 1029.7969 );
}
else if( strcmp( ImeIgraca( playerid ), hotelInfo[ i ][ hGuest_2 ], true ) == 0) {
ac_SetPlayerPos( playerid, 2235.9670, -1158.5640, 1029.7969 );
}
else if( strcmp( ImeIgraca( playerid ), hotelInfo[ i ][ hGuest_3 ], true ) == 0) {
ac_SetPlayerPos( playerid, 2235.7524, -1169.7406, 1029.8043 );
}
else if( strcmp( ImeIgraca( playerid ), hotelInfo[ i ][ hGuest_4 ], true ) == 0) {
ac_SetPlayerPos( playerid, 2227.1511, -1182.9784, 1029.8043 );
}
else if( strcmp( ImeIgraca( playerid ), hotelInfo[ i ][ hGuest_5 ], true ) == 0) {
ac_SetPlayerPos( playerid, 2207.9285, -1194.5630, 1029.7969 );
}
else if( strcmp( ImeIgraca( playerid ), hotelInfo[ i ][ hGuest_6 ], true ) == 0) {
ac_SetPlayerPos( playerid, 2198.8984, -1174.5468, 1029.8043 );
}
else if( strcmp( ImeIgraca( playerid ), hotelInfo[ i ][ hGuest_7 ], true ) == 0) {
ac_SetPlayerPos( playerid, 2188.1833, -1155.7197, 1029.7969 );
}
else if( strcmp( ImeIgraca( playerid ), hotelInfo[ i ][ hGuest_8 ], true ) == 0) {
ac_SetPlayerPos( playerid, 2198.7791, -1158.6515, 1029.7969 );
}
else if( strcmp( ImeIgraca( playerid ), hotelInfo[ i ][ hGuest_9 ], true ) == 0) {
ac_SetPlayerPos( playerid, 2188.1833, -1155.7197, 1029.7969 );
}
else if( strcmp( ImeIgraca( playerid ), hotelInfo[ i ][ hGuest_10 ], true ) == 0) {
ac_SetPlayerPos( playerid, 2198.7791, -1158.6515, 1029.7969 );
}
else {
PlayerInfo[playerid][ xHotelRoom ] = -1;
SCM( playerid, LIGHTBLUE, " Iseljeni ste iz hotela!");
new rand = random( sizeof( RandomLSSpawn1 ) );
ac_SetPlayerPos( playerid, RandomLSSpawn1[ rand ][ 0 ], RandomLSSpawn1[ rand ][ 1 ],RandomLSSpawn1[ rand ][ 2 ] );
SetPlayerFacingAngle( playerid, RandomLSSpawn1[ rand ][ 3 ] );
SetTimerEx( "SlobodnoSada", 4000, false, "i", playerid );
GameTextForPlayer( playerid, "Ucitavanje...", 1000, 4 );
TogglePlayerControllable( playerid, false );
SetCameraBehindPlayer( playerid );
SetPlayerInterior( playerid, 0 );
PlayerInfo[playerid][ xSpawn ] = SPAWN_OBICAN_LS_1;
return 1;
}
GameTextForPlayer( playerid, "Ucitavanje...", 1000, 4 );
SetTimerEx( "SlobodnoSada", 4000, false, "i", playerid );
SetCameraBehindPlayer( playerid );
TogglePlayerControllable( playerid, false );
SetPlayerInterior( playerid, hotelInfo[ i ][ hInterior ] );
SetPlayerVirtualWorld( playerid, hotelInfo[ i ][ hVW ] );
inHotel[playerid] = i;
}
else {
new rand = random( sizeof( RandomLSSpawn1 ) );
ac_SetPlayerPos( playerid, RandomLSSpawn1[ rand ][ 0 ], RandomLSSpawn1[ rand ][ 1 ], RandomLSSpawn1[ rand ][ 2 ] );
SetPlayerFacingAngle( playerid, RandomLSSpawn1[ rand ][ 3 ] );
SetTimerEx( "SlobodnoSada", 4000, false, "i", playerid );
GameTextForPlayer( playerid, "Ucitavanje...", 1000, 4 );
TogglePlayerControllable( playerid, false );
SetCameraBehindPlayer( playerid );
SetPlayerInterior( playerid, 0 );
PlayerInfo[playerid][ xSpawn ] = SPAWN_OBICAN_LS_1;[/pawn]
Citat: Fergosonn poslato Maj 05, 2021, 17:27:00 POSLE PODNE
Jesi ubacio u OnPlayerConnect da proverava SPAWN igraca?
[pawn] public OnPlayerConnect( playerid ) {
SCM(playerid,-1,""SRVBOJA"[MODE] "BELA"Ucitavanje Moda, sacekajte malo...");
ServerInfo[ BrojPosetaServeru ]++;
SaveServerStats( );
CheckRekord( );
// be_FirstSpawn[playerid] = true;
EditGranicu[playerid] = -1;
createAltChat(playerid);
cObjects(playerid);
ResetPlayer( playerid );
// .. RegisterTDCreate( playerid );
StopAudioStreamForPlayer( playerid );
//PlayAudioStreamForPlayer(playerid,"http://k007.kiwi6.com/hotlink/mztxnykcab/SAINt_JHN_-_Roses_Lyrics_Imanbek_Remix.mp3");
TogglePlayerDynamicCP( playerid, GarbageCheckpoint, 0 );
PlayerInfo[playerid][ xOrobanoZ ] = 0;
SetPlayerVirtualWorld(playerid, (playerid + 2000));
SetPlayerColor(playerid, 0xAFAFAF00);
#if ZIMSKI_MOD == 1
EffectTimer[playerid] = SetTimerEx( "ActionEffect", 1900, true, "d", playerid );
#endif [/pawn]
[pawn]//=================================== < SPAWNOVI > =========================================//
#define SPAWN_OBICAN_LS_1 0
#define SPAWN_BAZA 1
#define SPAWN_IMOVINA_1 2
#define SPAWN_IMOVINA_2 3
#define SPAWN_IMOVINA_3 4
#define SPAWN_ALEBAKUCA 5
#define SPAWN_OBICAN_LS_2 6 [/pawn]
[pawn] }
else {
if( PlayerInfo[playerid][ xSpawn ] == SPAWN_Admin ) {
if( PlayerInfo[playerid][xAdmin] >= 1 ) {
ac_SetPlayerPos( playerid, -580.5885, 2591.0078, 63.7758 );
SetPlayerFacingAngle( playerid, 360.000 );
SetTimerEx( "SlobodnoSada", 4000, false, "i", playerid );
GameTextForPlayer( playerid, "Ucitavanje...", 1000, 4 );
TogglePlayerControllable( playerid, false );
SetCameraBehindPlayer( playerid );
SetPlayerVirtualWorld( playerid, 0 );
SetPlayerInterior( playerid, 0 );
SavePlayer(playerid);
}
else {
new rand = random( sizeof( RandomLSSpawn1 ) );
ac_SetPlayerPos( playerid, RandomLSSpawn1[ rand ][ 0 ], RandomLSSpawn1[ rand ][ 1 ], RandomLSSpawn1[ rand ][ 2 ] );
SetPlayerFacingAngle( playerid, RandomLSSpawn1[ rand ][ 3 ] );
SetTimerEx( "SlobodnoSada", 4000, false, "i", playerid );
GameTextForPlayer( playerid, "Ucitavanje...", 1000, 4 );
TogglePlayerControllable( playerid, false );
SetCameraBehindPlayer( playerid );
SetPlayerInterior( playerid, 0 );
PlayerInfo[playerid][ xSpawn ] = SPAWN_OBICAN_LS_1;
SavePlayer(playerid);
}
}
else if( PlayerInfo[playerid][ xSpawn ] == SPAWN_HELPER ) {
if( PlayerInfo[playerid][ xHelper ] >= 1 ) {
ac_SetPlayerPos( playerid, 2367.3674,576.6254,8.5636 );
SetPlayerFacingAngle( playerid, 88.8378);
SetTimerEx( "SlobodnoSada", 4000, false, "i", playerid );
GameTextForPlayer( playerid, "Ucitavanje...", 1000, 4 );
TogglePlayerControllable( playerid, false );
SetCameraBehindPlayer( playerid );
SetPlayerInterior( playerid, 0 );
SavePlayer(playerid);
}
else {
new rand = random( sizeof( RandomLSSpawn1 ) );
ac_SetPlayerPos( playerid, RandomLSSpawn1[ rand ][ 0 ], RandomLSSpawn1[ rand ][ 1 ], RandomLSSpawn1[ rand ][ 2 ] );
SetPlayerFacingAngle( playerid, RandomLSSpawn1[ rand ][ 3 ] );
SetTimerEx( "SlobodnoSada", 4000, false, "i", playerid );
GameTextForPlayer( playerid, "Ucitavanje...", 1000, 4 );
TogglePlayerControllable( playerid, false );
SetCameraBehindPlayer( playerid );
SetPlayerInterior( playerid, 0 );
PlayerInfo[playerid][ xSpawn ] = SPAWN_OBICAN_LS_1;
SavePlayer(playerid);
}
}
else if( PlayerInfo[playerid][ xSpawn ] == SPAWN_OBICAN_LS_1 ) {
new rand = random( sizeof( RandomLSSpawn1 ) );
ac_SetPlayerPos( playerid, RandomLSSpawn1[ rand ][ 0 ], RandomLSSpawn1[ rand ][ 1 ],RandomLSSpawn1[ rand ][ 2 ] );
SetPlayerFacingAngle( playerid, RandomLSSpawn1[ rand ][ 3 ] );
SetTimerEx( "SlobodnoSada", 4000, false, "i", playerid );
GameTextForPlayer( playerid, "Ucitavanje...", 1000, 4 );
TogglePlayerControllable( playerid, false );
SetCameraBehindPlayer( playerid );
SetPlayerInterior( playerid, 0 );
SavePlayer(playerid);
}
else if( PlayerInfo[playerid][ xSpawn ] == SPAWN_BAZA ) {
ac_SetPlayerPos( playerid, OI[ OrgID ][ oPozIntX ], OI[ OrgID ][ oPozIntY ] , OI[ OrgID ][ oPozIntZ ] );
SetTimerEx( "SlobodnoSada", 4000, false, "i", playerid );
GameTextForPlayer( playerid, "Ucitavanje...", 1000, 4 );
TogglePlayerControllable( playerid, false );
SetCameraBehindPlayer( playerid );
SetPlayerInterior( playerid, OI[ OrgID ][ oInt ] );
SetPlayerVirtualWorld( playerid, OI[ OrgID ][ oVw ] );
inOrgInt[playerid] = OrgID;
SavePlayer(playerid);
}
else if( PlayerInfo[playerid][ xSpawn ] == SPAWN_IMOVINA_1 ) {
if( PlayerInfo[playerid][ xProperty ][ 0 ] != -1 ) {
new i = PlayerInfo[playerid][ xProperty ][ 0 ];
ac_SetPlayerPos( playerid, II[ i ][ iExit ][ 0 ], II[ i ][ iExit ][ 1 ], II[ i ][ iExit ][ 2 ] );
GameTextForPlayer( playerid, "Ucitavanje...", 1000, 4 );
SetTimerEx( "SlobodnoSada", 4000, false, "i", playerid );
SetCameraBehindPlayer( playerid );
TogglePlayerControllable( playerid, false );
SetPlayerInterior( playerid, II[ i ][ iInterior ] );
SetPlayerVirtualWorld( playerid, II[ i ][ iVW ] );
inProperty[playerid] = i;
SavePlayer(playerid);
}
else {
new rand = random( sizeof( RandomLSSpawn1 ) );
ac_SetPlayerPos( playerid, RandomLSSpawn1[ rand ][ 0 ], RandomLSSpawn1[ rand ][ 1 ],RandomLSSpawn1[ rand ][ 2 ] );
SetPlayerFacingAngle( playerid, RandomLSSpawn1[ rand ][ 3 ] );
SetTimerEx( "SlobodnoSada", 4000, false, "i", playerid );
GameTextForPlayer( playerid, "Ucitavanje...", 1000, 4 );
TogglePlayerControllable( playerid, false );
SetCameraBehindPlayer( playerid );
SetPlayerInterior( playerid, 0 );
PlayerInfo[playerid][ xSpawn ] = SPAWN_OBICAN_LS_1;
SavePlayer(playerid);
}
}
else if( PlayerInfo[playerid][ xSpawn ] == SPAWN_IMOVINA_2 ) {
if( PlayerInfo[playerid][ xProperty ][ 1 ] != -1 ) {
new i = PlayerInfo[playerid][ xProperty ][ 1 ];
ac_SetPlayerPos( playerid, II[ i ][ iExit ][ 0 ], II[ i ][ iExit ][ 1 ], II[ i ][ iExit ][ 2 ] );
GameTextForPlayer( playerid, "Ucitavanje...", 1000, 4 );
SetTimerEx( "SlobodnoSada", 4000, false, "i", playerid );
SetCameraBehindPlayer( playerid );
TogglePlayerControllable( playerid, false );
SetPlayerInterior( playerid, II[ i ][ iInterior ] );
SetPlayerVirtualWorld( playerid, II[ i ][ iVW ] );
inProperty[playerid] = i;
SavePlayer(playerid);
}
else {
new rand = random( sizeof( RandomLSSpawn1 ) );
ac_SetPlayerPos( playerid, RandomLSSpawn1[ rand ][ 0 ], RandomLSSpawn1[ rand ][ 1 ],RandomLSSpawn1[ rand ][ 2 ] );
SetPlayerFacingAngle( playerid, RandomLSSpawn1[ rand ][ 3 ] );
SetTimerEx( "SlobodnoSada", 4000, false, "i", playerid );
GameTextForPlayer( playerid, "Ucitavanje...", 1000, 4 );
TogglePlayerControllable( playerid, false );
SetCameraBehindPlayer( playerid );
SetPlayerInterior( playerid, 0 );
PlayerInfo[playerid][ xSpawn ] = SPAWN_OBICAN_LS_1;
SavePlayer(playerid);
}
}
else if( PlayerInfo[playerid][ xSpawn ] == SPAWN_IMOVINA_3 ) {
if( PlayerInfo[playerid][ xProperty ][ 2 ] != -1 ) {
new i = PlayerInfo[playerid][ xProperty ][ 2 ];
ac_SetPlayerPos( playerid, II[ i ][ iExit ][ 0 ], II[ i ][ iExit ][ 1 ], II[ i ][ iExit ][ 2 ] );
GameTextForPlayer( playerid, "Ucitavanje...", 1000, 4 );
SetTimerEx( "SlobodnoSada", 4000, false, "i", playerid );
SetCameraBehindPlayer( playerid );
TogglePlayerControllable( playerid, false );
SetPlayerInterior( playerid, II[ i ][ iInterior ] );
SetPlayerVirtualWorld( playerid, II[ i ][ iVW ] );
inProperty[playerid] = i;
SavePlayer(playerid);
}
else {
new rand = random( sizeof( RandomLSSpawn1 ) );
ac_SetPlayerPos( playerid, RandomLSSpawn1[ rand ][ 0 ], RandomLSSpawn1[ rand ][ 1 ],RandomLSSpawn1[ rand ][ 2 ] );
SetPlayerFacingAngle( playerid, RandomLSSpawn1[ rand ][ 3 ] );
SetTimerEx( "SlobodnoSada", 4000, false, "i", playerid );
GameTextForPlayer( playerid, "Ucitavanje...", 1000, 4 );
TogglePlayerControllable( playerid, false );
SetCameraBehindPlayer( playerid );
SetPlayerInterior( playerid, 0 );
PlayerInfo[playerid][ xSpawn ] = SPAWN_OBICAN_LS_1;
SavePlayer(playerid);
}
}
else if( PlayerInfo[playerid][ xSpawn ] == SPAWN_ALEBAKUCA ) {
ac_SetPlayerPos( playerid, 1292.5704, -832.4692, 1085.6328 );
SetTimerEx( "SlobodnoSada", 4000, false, "i", playerid );
GameTextForPlayer( playerid, "Ucitavanje...", 1000, 4 );
TogglePlayerControllable( playerid, false );
SetCameraBehindPlayer( playerid );
SetPlayerInterior( playerid, 5 );
SetPlayerVirtualWorld( playerid, 0 );
SavePlayer(playerid);
}
else if( PlayerInfo[playerid][ xSpawn ] == SPAWN_OBICAN_LS_2 ) {
new rand = random( sizeof( RandomLSSpawn2 ) );
ac_SetPlayerPos( playerid, 1213.5996, -1747.0599, 13.5946 );
SetPlayerFacingAngle( playerid, RandomLSSpawn2[ rand ][ 3 ] );
SetTimerEx( "SlobodnoSada", 4000, false, "i", playerid );
GameTextForPlayer( playerid, "Ucitavanje...", 1000, 4 );
TogglePlayerControllable( playerid, false );
SetCameraBehindPlayer( playerid );
SetPlayerInterior( playerid, 0 );
SavePlayer(playerid);
}
else if( PlayerInfo[playerid][ xSpawn ] == SPAWN_RENTHOTEL ) {
if( PlayerInfo[playerid][ xHotelRoom ] != -1 ) {
new i = PlayerInfo[playerid][ xHotelRoom ];
if( strcmp( ImeIgraca( playerid ), hotelInfo[ i ][ hGuest_1 ], true ) == 0) {
ac_SetPlayerPos( playerid, 2246.6826, -1160.8252, 1029.7969 );
}
else if( strcmp( ImeIgraca( playerid ), hotelInfo[ i ][ hGuest_2 ], true ) == 0) {
ac_SetPlayerPos( playerid, 2235.9670, -1158.5640, 1029.7969 );
}
else if( strcmp( ImeIgraca( playerid ), hotelInfo[ i ][ hGuest_3 ], true ) == 0) {
ac_SetPlayerPos( playerid, 2235.7524, -1169.7406, 1029.8043 );
}
else if( strcmp( ImeIgraca( playerid ), hotelInfo[ i ][ hGuest_4 ], true ) == 0) {
ac_SetPlayerPos( playerid, 2227.1511, -1182.9784, 1029.8043 );
}
else if( strcmp( ImeIgraca( playerid ), hotelInfo[ i ][ hGuest_5 ], true ) == 0) {
ac_SetPlayerPos( playerid, 2207.9285, -1194.5630, 1029.7969 );
}
else if( strcmp( ImeIgraca( playerid ), hotelInfo[ i ][ hGuest_6 ], true ) == 0) {
ac_SetPlayerPos( playerid, 2198.8984, -1174.5468, 1029.8043 );
}
else if( strcmp( ImeIgraca( playerid ), hotelInfo[ i ][ hGuest_7 ], true ) == 0) {
ac_SetPlayerPos( playerid, 2188.1833, -1155.7197, 1029.7969 );
}
else if( strcmp( ImeIgraca( playerid ), hotelInfo[ i ][ hGuest_8 ], true ) == 0) {
ac_SetPlayerPos( playerid, 2198.7791, -1158.6515, 1029.7969 );
}
else if( strcmp( ImeIgraca( playerid ), hotelInfo[ i ][ hGuest_9 ], true ) == 0) {
ac_SetPlayerPos( playerid, 2188.1833, -1155.7197, 1029.7969 );
}
else if( strcmp( ImeIgraca( playerid ), hotelInfo[ i ][ hGuest_10 ], true ) == 0) {
ac_SetPlayerPos( playerid, 2198.7791, -1158.6515, 1029.7969 );
}
else {
PlayerInfo[playerid][ xHotelRoom ] = -1;
SCM( playerid, LIGHTBLUE, " Iseljeni ste iz hotela!");
new rand = random( sizeof( RandomLSSpawn1 ) );
ac_SetPlayerPos( playerid, RandomLSSpawn1[ rand ][ 0 ], RandomLSSpawn1[ rand ][ 1 ],RandomLSSpawn1[ rand ][ 2 ] );
SetPlayerFacingAngle( playerid, RandomLSSpawn1[ rand ][ 3 ] );
SetTimerEx( "SlobodnoSada", 4000, false, "i", playerid );
GameTextForPlayer( playerid, "Ucitavanje...", 1000, 4 );
TogglePlayerControllable( playerid, false );
SetCameraBehindPlayer( playerid );
SetPlayerInterior( playerid, 0 );
PlayerInfo[playerid][ xSpawn ] = SPAWN_OBICAN_LS_1;
return 1;
}
GameTextForPlayer( playerid, "Ucitavanje...", 1000, 4 );
SetTimerEx( "SlobodnoSada", 4000, false, "i", playerid );
SetCameraBehindPlayer( playerid );
TogglePlayerControllable( playerid, false );
SetPlayerInterior( playerid, hotelInfo[ i ][ hInterior ] );
SetPlayerVirtualWorld( playerid, hotelInfo[ i ][ hVW ] );
inHotel[playerid] = i;
SavePlayer(playerid);
}
else {
new rand = random( sizeof( RandomLSSpawn1 ) );
ac_SetPlayerPos( playerid, RandomLSSpawn1[ rand ][ 0 ], RandomLSSpawn1[ rand ][ 1 ], RandomLSSpawn1[ rand ][ 2 ] );
SetPlayerFacingAngle( playerid, RandomLSSpawn1[ rand ][ 3 ] );
SetTimerEx( "SlobodnoSada", 4000, false, "i", playerid );
GameTextForPlayer( playerid, "Ucitavanje...", 1000, 4 );
TogglePlayerControllable( playerid, false );
SetCameraBehindPlayer( playerid );
SetPlayerInterior( playerid, 0 );
PlayerInfo[playerid][ xSpawn ] = SPAWN_OBICAN_LS_1;
SavePlayer(playerid);
}
}
else if( PlayerInfo[playerid][ xSpawn ] == SPAWN_PROMOTER ) {
if( PlayerInfo[playerid][ xPromoter ] >= 1 ) {
ac_SetPlayerPos( playerid, -350.7411, 1736.5518, 42.6875 );
SetPlayerFacingAngle( playerid, 360.000 );
SetTimerEx( "SlobodnoSada", 4000, false, "i", playerid );
GameTextForPlayer( playerid, "Ucitavanje...", 1000, 4 );
TogglePlayerControllable( playerid, false );
SetCameraBehindPlayer( playerid );
SetPlayerInterior( playerid, 0 );
SavePlayer(playerid);
}
else {
new rand = random( sizeof( RandomLSSpawn1 ) );
ac_SetPlayerPos( playerid, RandomLSSpawn1[ rand ][ 0 ], RandomLSSpawn1[ rand ][ 1 ], RandomLSSpawn1[ rand ][ 2 ] );
SetPlayerFacingAngle( playerid, RandomLSSpawn1[ rand ][ 3 ] );
SetTimerEx( "SlobodnoSada", 4000, false, "i", playerid );
GameTextForPlayer( playerid, "Ucitavanje...", 1000, 4 );
TogglePlayerControllable( playerid, false );
SetCameraBehindPlayer( playerid );
SetPlayerInterior( playerid, 0 );
PlayerInfo[playerid][ xSpawn ] = SPAWN_OBICAN_LS_1;
SavePlayer(playerid);
}
}
else if( PlayerInfo[playerid][ xSpawn ] == SPAWN_RENT ) {
if( PlayerInfo[playerid][ xRentID ] != -1 ) {
new i = PlayerInfo[playerid][ xRentID ];
ac_SetPlayerPos( playerid, II[ i ][ iExit ][ 0 ], II[ i ][ iExit ][ 1 ], II[ i ][ iExit ][ 2 ] );
GameTextForPlayer( playerid, "Ucitavanje...", 1000, 4 );
SetTimerEx( "SlobodnoSada", 4000, false, "i", playerid );
SetCameraBehindPlayer( playerid );
TogglePlayerControllable( playerid, false );
SetPlayerInterior( playerid, II[ i ][ iInterior ] );
SetPlayerVirtualWorld( playerid, II[ i ][ iVW ] );
inProperty[playerid] = i;
SavePlayer(playerid);
}
else {
new rand = random( sizeof( RandomLSSpawn1 ) );
ac_SetPlayerPos( playerid, RandomLSSpawn1[ rand ][ 0 ], RandomLSSpawn1[ rand ][ 1 ], RandomLSSpawn1[ rand ][ 2 ] );
SetPlayerFacingAngle( playerid, RandomLSSpawn1[ rand ][ 3 ] );
SetTimerEx( "SlobodnoSada", 4000, false, "i", playerid );
GameTextForPlayer( playerid, "Ucitavanje...", 1000, 4 );
TogglePlayerControllable( playerid, false );
SetCameraBehindPlayer( playerid );
SetPlayerInterior( playerid, 0 );
PlayerInfo[playerid][ xSpawn ] = SPAWN_OBICAN_LS_1;
SavePlayer(playerid);
}
}
}
}
}
return true;
}
//============================================================================// [/pawn]
Kucaj u modu Float: RandomLSSpawn1 i promjenis koordinate i tako sa Float: RandomLSSpawn1 i tjt..