SA-MP Forums Archive
[AJUDA]Spawn - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: Non-English (https://sampforum.blast.hk/forumdisplay.php?fid=9)
+--- Forum: Languages (https://sampforum.blast.hk/forumdisplay.php?fid=33)
+---- Forum: Português/Portuguese (https://sampforum.blast.hk/forumdisplay.php?fid=34)
+---- Thread: [AJUDA]Spawn (/showthread.php?tid=265840)



[AJUDA]Spawn - Nake01 - 02.07.2011

Eae galera do Forum SA:MP tф com um pequeno problema ou bug nгo sei direito... eu criei um sistema pra quando o player logar apareзer os estados pra ele escolher dps dos estados a torcida quando ele escolhe um torcida cria um Arquivo chamado "Sedes.ini" e lб grava o nome do Player + um numero de 1 a 50 se ele escolher o time A ele й setado de numero 1 na Sedes.ini e no Time B Setado de 2 na Sedes.ini entгo coloquei isso no Spawn

PHP код:
public OnPlayerSpawn(playerid)
{
new 
PlayerNome[40];
GetPlayerName(playerid,PlayerNome,MAX_PLAYER_NAME);
if(
dini_Isset("Sedes.ini",PlayerNome))
{
if(
dini_Int("Sedes.ini",PlayerNome)==1)
    
SetPlayerPos(playerid, -2659.9709,882.5607,79.7738);
if(
dini_Int("Sedes.ini",PlayerNome)==2)
    
SetPlayerPos(playerid, -2645.4451,932.1965,72.4195);

OBS: QUANDO O PLAYER LOGA NO SERVER PELA PRIMEIRA VEZ, AI ELE SPAWN NUM LUGAR QUE ESTБ COLOCADO ACIMA SУ QUE FICA TUDO BRANCO AI SE ELE MORRER ELE SPAWN DINOVO NO LUGAR MAIS SУ QUE NГO FICA TUDO BRANCO AI APAREЗE TUDO NORMAL, ALGUEM SABE QUAL Й O PROBLEMA, PRECISO MUITO RESOLVER ESSE PROBLEMA


Re: [AJUDA]Spawn - ApolloRJ - 02.07.2011

nгo sei muito nгo + tenta por...

pawn Код:
SetPlayerInterior( playerid, 0 );

By ApolloRJ


Re: [AJUDA]Spawn - Shadoww5 - 02.07.2011

Poste a public OnPlayerSpawn.


Re: [AJUDA]Spawn - Nake01 - 02.07.2011

PHP код:
public OnPlayerSpawn(playerid)
{
new 
PlayerNome[40];
GetPlayerName(playerid,PlayerNome,MAX_PLAYER_NAME);
if(
dini_Isset("Sedes.ini",PlayerNome))
{
if(
dini_Int("Sedes.ini",PlayerNome)==1)
    
SetPlayerPos(playerid, -2659.9709,882.5607,79.7738);
if(
dini_Int("Sedes.ini",PlayerNome)==2)
    
SetPlayerPos(playerid, -2645.4451,932.1965,72.4195);
if(
dini_Int("Sedes.ini",PlayerNome)==3)
    
SetPlayerPos(playerid, -1642.3214,1204.5449,7.2558);
if(
dini_Int("Sedes.ini",PlayerNome)==4)
    
SetPlayerPos(playerid, -2501.5762,1209.0691,37.4283);
if(
dini_Int("Sedes.ini",PlayerNome)==5)
    
SetPlayerPos(playerid, -2625.3875,1408.2300,7.1016);
if(
dini_Int("Sedes.ini",PlayerNome)==6)
    
SetPlayerPos(playerid1675.8358,1448.6290,10.7862);
if(
dini_Int("Sedes.ini",PlayerNome)==7)
    
SetPlayerPos(playerid2160.6812,1404.1798,10.8203);
if(
dini_Int("Sedes.ini",PlayerNome)==8)
    
SetPlayerPos(playerid2797.4534,1257.1440,10.8872);
if(
dini_Int("Sedes.ini",PlayerNome)==9)
    
SetPlayerPos(playerid2538.4058,1963.9127,10.8203);
if(
dini_Int("Sedes.ini",PlayerNome)==10)
    
SetPlayerPos(playerid2223.6685,1840.4613,10.8203);
if(
dini_Int("Sedes.ini",PlayerNome)==11)
    
SetPlayerPos(playerid1460.1553,2773.6323,10.8203);
if(
dini_Int("Sedes.ini",PlayerNome)==12)
    
SetPlayerPos(playerid2246.5708,2520.1772,10.8203);
if(
dini_Int("Sedes.ini",PlayerNome)==13)
    
SetPlayerPos(playerid170.6916,1173.6094,14.7578);
if(
dini_Int("Sedes.ini",PlayerNome)==14)
    
SetPlayerPos(playerid, -250.8455,2604.5801,62.8582);
if(
dini_Int("Sedes.ini",PlayerNome)==15)
    
SetPlayerPos(playerid1695.5864,2207.9312,11.0692);
if(
dini_Int("Sedes.ini",PlayerNome)==16)
    
SetPlayerPos(playerid946.1237,1730.4707,8.8516);
if(
dini_Int("Sedes.ini",PlayerNome)==17)
    
SetPlayerPos(playerid1051.8269,2401.3374,10.8203);
if(
dini_Int("Sedes.ini",PlayerNome)==18)
    
SetPlayerPos(playerid2119.4607,2206.8147,10.6719);
if(
dini_Int("Sedes.ini",PlayerNome)==19)
    
SetPlayerPos(playerid1953.5548,2293.0618,10.8203);
if(
dini_Int("Sedes.ini",PlayerNome)==20)
    
SetPlayerPos(playerid2250.4753,2407.2139,10.8203);
if(
dini_Int("Sedes.ini",PlayerNome)==21)
    
SetPlayerPos(playerid1545.5378,1125.2772,10.8125);
if(
dini_Int("Sedes.ini",PlayerNome)==22)
    
SetPlayerPos(playerid2001.9502,-994.6542,31.2663);
if(
dini_Int("Sedes.ini",PlayerNome)==23)
    
SetPlayerPos(playerid2156.7495,-1014.2775,62.9453);
if(
dini_Int("Sedes.ini",PlayerNome)==24)
    
SetPlayerPos(playerid1357.6401,253.4726,19.5669);
if(
dini_Int("Sedes.ini",PlayerNome)==25)
    
SetPlayerPos(playerid627.7480,-586.4487,16.5722);
if(
dini_Int("Sedes.ini",PlayerNome)==26)
    
SetPlayerPos(playerid2829.5151,-1182.2961,24.8495);
if(
dini_Int("Sedes.ini",PlayerNome)==27)
    
SetPlayerPos(playerid2217.0876,-1142.7720,25.8079);
if(
dini_Int("Sedes.ini",PlayerNome)==28)
    
SetPlayerPos(playerid311.1113,-1773.5101,4.6577);
if(
dini_Int("Sedes.ini",PlayerNome)==29)
    
SetPlayerPos(playerid453.0527,-1483.2054,30.9510);
if(
dini_Int("Sedes.ini",PlayerNome)==30)
    
SetPlayerPos(playerid870.6255,-1257.6185,14.9732);
if(
dini_Int("Sedes.ini",PlayerNome)==31)
    
SetPlayerPos(playerid1085.0785,-1699.8762,13.5469);
if(
dini_Int("Sedes.ini",PlayerNome)==32)
    
SetPlayerPos(playerid996.1561,-1340.2577,13.3828);
if(
dini_Int("Sedes.ini",PlayerNome)==33)
    
SetPlayerPos(playerid1143.1481,-928.7899,43.1867);
if(
dini_Int("Sedes.ini",PlayerNome)==34)
    
SetPlayerPos(playerid1184.6897,-924.0978,43.1827);
if(
dini_Int("Sedes.ini",PlayerNome)==35)
    
SetPlayerPos(playerid1319.7095,-1710.7578,13.5469);
if(
dini_Int("Sedes.ini",PlayerNome)==36)
    
SetPlayerPos(playerid2494.7776,-1685.1975,13.5116);
if(
dini_Int("Sedes.ini",PlayerNome)==37)
    
SetPlayerPos(playerid2315.0630,-1647.2949,14.8270);
if(
dini_Int("Sedes.ini",PlayerNome)==38)
    
SetPlayerPos(playerid2272.8303,-1667.1112,15.3476);
if(
dini_Int("Sedes.ini",PlayerNome)==39)
    
SetPlayerPos(playerid2252.2590,-1665.2562,15.4690);
if(
dini_Int("Sedes.ini",PlayerNome)==40)
    
SetPlayerPos(playerid2087.4487,-1805.9081,13.5469);
if(
dini_Int("Sedes.ini",PlayerNome)==41)
    
SetPlayerPos(playerid1933.0087,-1770.6599,13.3828);
if(
dini_Int("Sedes.ini",PlayerNome)==42)
    
SetPlayerPos(playerid1707.1143,-2112.8333,13.3828);
if(
dini_Int("Sedes.ini",PlayerNome)==43)
    
SetPlayerPos(playerid2720.8096,-2022.3419,13.5472);
if(
dini_Int("Sedes.ini",PlayerNome)==44)
    
SetPlayerPos(playerid, -1989.6061,286.3712,34.1875);
if(
dini_Int("Sedes.ini",PlayerNome)==45)
    
SetPlayerPos(playerid, -2018.3699,62.4978,29.3502);
if(
dini_Int("Sedes.ini",PlayerNome)==46)
    
SetPlayerPos(playerid, -2027.0381,-90.6938,35.3203);
if(
dini_Int("Sedes.ini",PlayerNome)==47)
    
SetPlayerPos(playerid, -1823.3977,96.1743,15.1172);
if(
dini_Int("Sedes.ini",PlayerNome)==48)
    
SetPlayerPos(playerid, -1660.8391,419.7237,7.1797);
if(
dini_Int("Sedes.ini",PlayerNome)==49)
    
SetPlayerPos(playerid, -2353.3047,-143.4342,35.3203);
if(
dini_Int("Sedes.ini",PlayerNome)==50)
    
SetPlayerPos(playerid, -2246.0293,-84.6466,35.3203);
if(
dini_Int("Sedes.ini",PlayerNome)==51)
    
SetPlayerPos(playerid, -2493.9255,-36.6893,25.7656);
if(
dini_Int("Sedes.ini",PlayerNome)==52)
    
SetPlayerPos(playerid, -2443.9126,748.2939,35.1719);
if(
dini_Int("Sedes.ini",PlayerNome)==53)
    
SetPlayerPos(playerid, -2668.0706,273.1569,4.3359);
if(
dini_Int("Sedes.ini",PlayerNome)==54)
    
SetPlayerPos(playerid710.1481,-1442.0428,17.6953);
if(
dini_Int("Sedes.ini",PlayerNome)==55)
    
SetPlayerPos(playerid,1657.1792,2185.8982,10.8203);
if(
dini_Int("Sedes.ini",PlayerNome)==56)
    
SetPlayerPos(playerid1669.9259,1815.7003,10.8203);
if(
dini_Int("Sedes.ini",PlayerNome)==57)
    
SetPlayerPos(playerid813.6563,-1614.6880,13.6190);
if(
dini_Int("Sedes.ini",PlayerNome)==58)
    
SetPlayerPos(playerid1345.9897,-1748.0625,13.3721);
if(
dini_Int("Sedes.ini",PlayerNome)==59)
    
SetPlayerPos(playerid811.5933,-770.0187,76.5314);
if(
dini_Int("Sedes.ini",PlayerNome)==100)
    
SetPlayerPos(playerid1025.3439,-1127.0024,23.8758);
if(
dini_Int("Sedes.ini",PlayerNome)==101)
    
SetPlayerPos(playerid503.3098,-1363.3485,16.1252);
if(
dini_Int("Sedes.ini",PlayerNome)==102)
    
SetPlayerPos(playerid2664.8826,-1093.9120,69.4483);
if(
dini_Int("Sedes.ini",PlayerNome)==103)
    
SetPlayerPos(playerid, -2688.2427,-284.5258,7.1736);
if(
dini_Int("Sedes.ini",PlayerNome)==104)
    
SetPlayerPos(playerid2142.6470,-1187.2552,23.9922);
if(
dini_Int("Sedes.ini",PlayerNome)==105)
    
SetPlayerPos(playerid, -2430.9319,-185.2272,35.3203);
if(
dini_Int("Sedes.ini",PlayerNome)==106)
    
SetPlayerPos(playerid1630.9641,972.9005,10.8203);
if(
dini_Int("Sedes.ini",PlayerNome)==107)
    
SetPlayerPos(playerid1893.0521,2243.6294,10.8203);
if(
dini_Int("Sedes.ini",PlayerNome)==108)
    
SetPlayerPos(playerid2560.5874,2048.7324,10.8203);
}
        if(
PlayerInfo[playerid][GAT] >= 1)
        {
                        
// GAT NASCE
                        
SetPlayerInterior(playerid,0);
                        
SetPlayerPos(playerid,1567.0951,-1696.1991,5.8906);
                        
GameTextForPlayer(playerid,"~w~GAT"1000,1);
                        
GivePlayerWeapon(playerid,29,999999);
                        
GivePlayerWeapon(playerid,27,999999);
                        
GivePlayerWeapon(playerid,41,999999);
                        
GivePlayerWeapon(playerid,24,999999);
                        
GivePlayerWeapon(playerid,4,999999);
                        
GivePlayerWeapon(playerid,34,999999);
                        
GivePlayerWeapon(playerid,31,999999);
                        
SetPlayerArmour(playerid100.0);
                        
SetPlayerColor(playerid0xA81B00AA);
                        
SetPlayerSkin(playerid285);
                        
SetPlayerHealth(playerid100.0);
                        
SetPlayerVirtualWorld(playerid0);
                        
TogglePlayerControllable(playerid,1);
            }
    return 
1;

@EDIT

Foooi ApolloRJ Obrigado.

Obrigado a vocк tambйm Shadoww por sempre tentar me ajuda !


Re: [AJUDA]Spawn - Ricop522 - 02.07.2011

Creio eu que isso funciona, rs

PHP код:
if(dini_Isset("Sedes.ini",PlayerNome))
{
    for(new 
0x0<= 108; ++) {
        if(
dini_Int("Sedes.ini",PlayerNome) == i)
        
SetPlayerPos(playerid, -2659.9709,882.5607,79.7738);
    }

Se eu estive renganado, pode corrigir-me