PARTNERI:
-UPOZORENJE-

Samo registrovani članovi mogu da vide/koriste forum u celini.
Prijavite se ili registrujte nalog na Balkan SA-MP forumu.


Autor Tema: [Rešeno] pomoc oko promene spawna  (Pročitano 197 puta)

0 članova i 1 gost pregledaju ovu temu.

Van mreže Stefke.

  • Pee-Wee
  • *
  • Poruke: 43
pomoc oko promene spawna
« poslato: Maj 04, 2021, 15:20:03 posle podne »
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:
Pawno Code: [Izaberi]
}
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;
« Poslednja izmena: Maj 07, 2021, 16:10:25 posle podne M Ө M Σ N Z I »
 

Na mreži Deleted User

Odg: pomoc oko promene spawna
« Odgovor #1 poslato: Maj 04, 2021, 19:27:12 posle podne »
Debug PlayerInfo[playerid][ xSpawn ]
Pro pawno developer i skripter. Ripujem svakakve sisteme iz svakakvih modova za $$$ nove greske i bagovi su gratis.
 

Van mreže Stefke.

  • Pee-Wee
  • *
  • Poruke: 43
Odg: pomoc oko promene spawna
« Odgovor #2 poslato: Maj 04, 2021, 20:52:05 posle podne »
Debug PlayerInfo[playerid][ xSpawn ]

Debug trebam dodati ispred toga ili ?
 

Na mreži Deleted User

Odg: pomoc oko promene spawna
« Odgovor #3 poslato: Maj 04, 2021, 21:09:42 posle podne »
Pa dodas u komandu za promenu spawn-a
Pre i posle promene.
Dodas u OnPlayerSpawn, da znas koji ti je tu value bio i da li se poklapa sa onim sto bi trebalo da bude
Dalje ces vec sam znati gde da gledas kad debug
Pro pawno developer i skripter. Ripujem svakakve sisteme iz svakakvih modova za $$$ nove greske i bagovi su gratis.
 

Van mreže Stefke.

  • Pee-Wee
  • *
  • Poruke: 43
Odg: pomoc oko promene spawna
« Odgovor #4 poslato: Maj 04, 2021, 21:55:34 posle podne »
Pawno Code: [Izaberi]
CMD:promenispawn( playerid, params[] ) {
//if( PlayerInfo[playerid][ xMaraton ] > 0 ) return GRESKA( playerid, "Ne mozete to kod ste na maratonu !");
//if( PlayerInfo[playerid][ xMaraton ] > 0 ) return GRESKA( playerid, "Ne mozete to dok ste na maratonu !");
    if( PlayerInfo[playerid][xAdmin] >= 1 || PlayerInfo[playerid][ xHelper ] >= 1 ) {
        SPD( playerid, D_SPAWNCHANGE, DSL, D_NASLOV, "Spawn1\nSpawn2\nOrganizacijski spawn\nSpawn Imovina 1\nSpawn Imovina 2\nSpawn Imovina 3\nBela Kuca\nHotelska soba\nIznajmljena soba\nAdmin baza\nHelper Baza", D_ODABERI, D_ODUSTANI );
    }
    else {
SPD( playerid, D_SPAWNCHANGE, DSL, D_NASLOV, "Spawn1\nSpawn2\nOrganizacijski spawn\nSpawn Imovina 1\nSpawn Imovina 2\nSpawn Imovina 3\nBela Kuca\nHotelska soba\nIznajmljena soba", D_ODABERI, D_ODUSTANI );
}
return 1;
}
Jel tu trebam dodati ili gde ne kontam najbolje?
« Poslednja izmena: Maj 04, 2021, 21:56:46 posle podne Stefan Rodrigez »
 

Van mreže Fergosonn

Odg: pomoc oko promene spawna
« Odgovor #5 poslato: Maj 05, 2021, 08:15:16 pre podne »
Pawno Code: [Izaberi]
new Float:RandomSpawn[2][3] =
{
{336.3988,-1506.7084,35.8672},//Ovo menjas
{336.3988,-1506.7084,35.8672}//ovo menjas
};
 

Van mreže Fergosonn

Odg: pomoc oko promene spawna
« Odgovor #6 poslato: Maj 05, 2021, 09:04:02 pre podne »
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:
Pawno Code: [Izaberi]
}
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;

Naravno da nece da ti promeni spawn kad nigde nisi ubacio da ti sacuva da je spawn promenjen
 

Van mreže Stefke.

  • Pee-Wee
  • *
  • Poruke: 43
Odg: pomoc oko promene spawna
« Odgovor #7 poslato: Maj 05, 2021, 11:47:58 pre podne »
Naravno da nece da ti promeni spawn kad nigde nisi ubacio da ti sacuva da je spawn promenjen

Kako nisam sacuvao?
 

Van mreže Fergosonn

Odg: pomoc oko promene spawna
« Odgovor #8 poslato: Maj 05, 2021, 13:07:40 posle podne »
Kako nisam sacuvao?

Pogledaj kod i vidi jel imas bilo kuda SavePlayer? naravno da ce da ti ispise tekst ali nece da ti sacuva
Pawno Code: [Izaberi]
SavePlayer(playerid); // Ovo dodajes da sacuva informacije igraca
 

Van mreže Stefke.

  • Pee-Wee
  • *
  • Poruke: 43
Odg: pomoc oko promene spawna
« Odgovor #9 poslato: Maj 05, 2021, 13:38:51 posle podne »
Pogledaj kod i vidi jel imas bilo kuda SavePlayer? naravno da ce da ti ispise tekst ali nece da ti sacuva
Pawno Code: [Izaberi]
SavePlayer(playerid); // Ovo dodajes da sacuva informacije igraca

Dodao sam ali idalje na istom se apawna
 

Van mreže Galardo

Odg: pomoc oko promene spawna
« Odgovor #10 poslato: Maj 05, 2021, 13:46:58 posle podne »
Dodao sam ali idalje na istom se apawna
A da provjeris da li unutar saveplayer ima da cuva poziciju spawna?
 

Van mreže Stefke.

  • Pee-Wee
  • *
  • Poruke: 43
Odg: pomoc oko promene spawna
« Odgovor #11 poslato: Maj 05, 2021, 15:57:04 posle podne »
A da provjeris da li unutar saveplayer ima da cuva poziciju spawna?

Za Ls2 spawn ima pozicija a za org i enterijer gleda i koja je org i koji ent kao za inovinu
 

Van mreže Fergosonn

Odg: pomoc oko promene spawna
« Odgovor #12 poslato: Maj 05, 2021, 17:27:00 posle podne »
Za Ls2 spawn ima pozicija a za org i enterijer gleda i koja je org i koji ent kao za inovinu
Jesi ubacio u OnPlayerConnect da proverava SPAWN igraca?
 

Van mreže Stefke.

  • Pee-Wee
  • *
  • Poruke: 43
Odg: pomoc oko promene spawna
« Odgovor #13 poslato: Maj 05, 2021, 22:38:04 posle podne »
Jesi ubacio u OnPlayerConnect da proverava SPAWN igraca?

Pawno Code: [Izaberi]
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 

Pawno Code: [Izaberi]
//=================================== < 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

Pawno Code: [Izaberi]
}
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;
}

//============================================================================//
 

Van mreže Lucas.PwN

Odg: pomoc oko promene spawna
« Odgovor #14 poslato: Maj 05, 2021, 23:17:01 posle podne »
Kucaj u modu Float: RandomLSSpawn1 i promjenis koordinate i tako sa Float: RandomLSSpawn1 i tjt..