[Ajuda] Toda hora nasce no aeroporto quando cria acc
#1

Qnd alguem registra toda hora nasce no aeroporto, tem como mudar? ja tentei procurar as coordenadas no SetPlayerPos e nada '-'
Reply
#2

Ta Bugado!
Tenta fazer random se nao der tenta achar o bug do seu GM!
Reply
#3

deixa eu ver o onplayerspawn
Reply
#4

Public:
pawn Код:
public OnPlayerRequestClass(playerid, classid
Tente procurar por:
pawn Код:
SetPlayerPos(...
Se nгo tiver, vai em ongamemodeinit, e procura por
pawn Код:
AddPlayerClass(
Se nгo tiver...
Queima seu GF...
Reply
#5

onplayerRequest й esse:

pawn Код:
public OnPlayerRequestClass(playerid, classid)
{
new aname[MAX_PLAYER_NAME];
GetPlayerName(playerid, aname, MAX_PLAYER_NAME);
format(file, sizeof(file), P_CONTAS, aname);
SetPlayerSkin(playerid,dini_Int(file, "Skin"));
ShowPlayerDialog(playerid, AVISO, DIALOG_STYLE_MSGBOX,"New Virtual City", "Vocк esta comecando uma Nova Vida\nClique em OK e comece a jogar", "Ok", "Sair");
PlayerPlaySound(playerid, 1185, 0.0, 0.0, 0.0);
GameTextForPlayer(playerid,"Bom Jogo", 2000, 1);
SetPlayerCameraPos(playerid,1219.2681,-1815.0945,16.5938);
SetPlayerCameraLookAt(playerid,1219.2681,-1815.0945,16.5938);
SetPlayerPos(playerid, 1219.2681,-1815.0945,16.5938);
SetPlayerInterior(playerid, 0);
PlayerPlaySound(playerid,1097,2808.1721,-1425.4561,55.2740);//musica on
ApplyAnimation(playerid,"STRIP", "STR_Loop_A", 1.800001, 1, 0, 0, 1, 600);
return 1;
}
On player spawn
pawn Код:
public OnPlayerSpawn(playerid)
{
emcasa[playerid] = 0;
new aname[MAX_PLAYER_NAME];
GetPlayerName(playerid, aname, MAX_PLAYER_NAME);
format(file, sizeof(file), P_CONTAS, aname);
TextDrawHideForPlayer(playerid, topblack);
TextDrawHideForPlayer(playerid, bottomblack);
TextDrawHideForPlayer(playerid, drogas1);
TextDrawHideForPlayer(playerid, drogas2);
TextDrawShowForPlayer(playerid, DataTxT);
TextDrawShowForPlayer(playerid, HorasTxT);
//TextDrawShowForPlayer(playerid, Relogio);
SetPlayerInterior(playerid,0);
PlayerPlaySound(playerid, 1184, 0.0, 0.0, 0.0);
GangZoneShowForPlayer(playerid,favela,Amarelo);
GangZoneShowForPlayer(playerid, AreaPesca, AzuL4);
GangZoneShowForPlayer(playerid, AreaDrogas, roxo);
GangZoneShowForPlayer(playerid, areadmlv, COLOR_WHITE);
//variavel
gmod[playerid] = 0;
noevento[playerid] = 0;
GPS_Spawned[playerid] = 1;
Logarprof(playerid);
autoescola[playerid] = 0;
prefls[playerid] = 0;
nautlls[playerid] = 0;
algemado[playerid] = 0;
sequestro[playerid] = 0;
vercmds[playerid]=0;
verpms[playerid]=0;
dini_IntSet(file, "convitent", 0);
dini_IntSet(file, "Entrevista", 0);
dini_IntSet(file, "MN", 0);
dini_IntSet(file, "MSenha", 0);
//fim
if(dini_Int(file, "Procurado") == 1){
Procurados[playerid]= 1;
}
if(dini_Int(file, "Procurado") == 0){
Procurados[playerid]= 0;
}
if(dini_Int(file, "VIP") == 1){
vip[playerid] = 1;
SendClientMessage(playerid, roxo, "{0099FF}[x]{CCCCFF} Vocк й um jogador VIP, veja suas vantagens digitando: /comandosvip!");
}
if(dini_Int(file, "VIP") == 0){
vip[playerid] = 0;
}
if(dini_Int(file, "Lutas") == 1){
SetPlayerFightingStyle (playerid, FIGHT_STYLE_ELBOW);
}
if(dini_Int(file, "Lutas") == 2){
SetPlayerFightingStyle (playerid, FIGHT_STYLE_BOXING);
}
if(dini_Int(file, "Lutas") == 3){
SetPlayerFightingStyle(playerid, FIGHT_STYLE_GRABKICK);
}
if(dini_Int(file, "Lutas") == 4){
SetPlayerFightingStyle (playerid, FIGHT_STYLE_KNEEHEAD);
}
if(dini_Int(file, "Lutas") == 5){
SetPlayerFightingStyle (playerid, FIGHT_STYLE_KUNGFU);
}
if(dini_Int(file, "Lutas") == 6){
SetPlayerFightingStyle (playerid, FIGHT_STYLE_NORMAL);
}
if(dini_Int(file, "Preso") == 1){
SetPlayerPos(playerid, 1587.5526,-1791.1556,30.9624);
SetPlayerInterior(playerid, 0);
SetPlayerHealth(playerid,99999);
ResetPlayerWeapons(playerid);
TogglePlayerControllable(playerid, 1);
SendClientMessage(playerid, msgdm, "{0099FF}[x]{CCCCFF} Vocк estб preso, contrate um advogado ou pague a fianзa /fianca");
preso[playerid] = 1;
dini_IntSet(file2, "ofmaconha", 0);
dini_IntSet(file2, "vendepizza", 0);
dini_IntSet(file2, "ofcrack", 0);
dini_IntSet(file, "passarmacumba", 0);
dini_IntSet(file, "usoudroga", 0);
dini_IntSet(file, "tamacumbado", 0);
dini_IntSet(file, "tmaconha", 0);
dini_IntSet(file, "tmacumba", 0);
dini_IntSet(file, "tcrack", 0);
dini_IntSet(file, "tpizza", 0);
dini_IntSet(file, "Maconha", 0);
dini_IntSet(file, "Crack", 0);
dini_IntSet(file, "Macumba", 0);
dini_IntSet(file, "pizza", 0);
}
return 1;
}
Reply
#6

Tente acrescentar isso.

Topo do GM
pawn Код:
forward SetPlayerRandomSpawn(playerid);
new iSpawnSet[MAX_PLAYERS];
new Float:RandomSpawn[][6] =
{
    {-973.6733,1061.2589,1345.6721,85.6553},
    {-1027.8649,1081.1333,1343.2194,282.9058},
    {-1025.7057,1082.3707,1343.3472,67.0405},
    {-1039.5646,1085.4370,1343.3317,154.3409},
    {-1062.0338,1070.1962,1343.4124,121.8743},
    {-1069.0345,1092.3414,1343.1663,116.1298}
};
new iSpawnedCar[MAX]=-1;
new OnSkyDiving[MAX];
new Float:gRandomPlayerSpawns[28][3] = {
{1958.3783,1343.1572,15.3746},
{2199.6531,1393.3678,10.8203},
{2483.5977,1222.0825,10.8203},
{2637.2712,1129.2743,11.1797},
{2000.0106,1521.1111,17.0625},
{2024.8190,1917.9425,12.3386},
{2261.9048,2035.9547,10.8203},
{2262.0986,2398.6572,10.8203},
{2244.2566,2523.7280,10.8203},
{2335.3228,2786.4478,10.8203},
{2150.0186,2734.2297,11.1763},
{2158.0811,2797.5488,10.8203},
{1969.8301,2722.8564,10.8203},
{1652.0555,2709.4072,10.8265},
{1564.0052,2756.9463,10.8203},
{1271.5452,2554.0227,10.8203},
{1441.5894,2567.9099,10.8203},
{1480.6473,2213.5718,11.0234},
{1400.5906,2225.6960,11.0234},
{1598.8419,2221.5676,11.0625},
{1318.7759,1251.3580,10.8203},
{1558.0731,1007.8292,10.8125},
{-857.0551,1536.6832,22.5870},
{817.3494,856.5039,12.7891},
{116.9315,1110.1823,13.6094},
{-18.8529,1176.0159,19.5634},
{-315.0575,1774.0636,43.6406},
{1705.2347,1025.6808,10.8203}
};
Adicione essa public
pawn Код:
public SetPlayerRandomSpawn(playerid)
{
    if (iSpawnSet[playerid] == 1) {
        new rand = random(sizeof(gCopPlayerSpawns));
        SetPlayerPos(playerid, gCopPlayerSpawns[rand][0], gCopPlayerSpawns[rand][1], gCopPlayerSpawns[rand][2]);
        SetPlayerFacingAngle(playerid, 270.0);
    }
    else if (iSpawnSet[playerid] == 0) {
        new rand = random(sizeof(gRandomPlayerSpawns));
        SetPlayerPos(playerid, gRandomPlayerSpawns[rand][0], gRandomPlayerSpawns[rand][1], gRandomPlayerSpawns[rand][2]);
    }
    return 1;
}
Adapte isso no seu OnPlayerSpawn
pawn Код:
//OnPlayerSpawn
SetPlayerRandomSpawn(playerid);
Reply
#7

pawn Код:
public OnPlayerSpawn(playerid)
{
emcasa[playerid] = 0;
new aname[MAX_PLAYER_NAME];
GetPlayerName(playerid, aname, MAX_PLAYER_NAME);
format(file, sizeof(file), P_CONTAS, aname);
TextDrawHideForPlayer(playerid, topblack);
TextDrawHideForPlayer(playerid, bottomblack);
TextDrawHideForPlayer(playerid, drogas1);
TextDrawHideForPlayer(playerid, drogas2);
TextDrawShowForPlayer(playerid, DataTxT);
TextDrawShowForPlayer(playerid, HorasTxT);
//TextDrawShowForPlayer(playerid, Relogio);
SetPlayerInterior(playerid,0);
PlayerPlaySound(playerid, 1184, 0.0, 0.0, 0.0);
GangZoneShowForPlayer(playerid,favela,Amarelo);
GangZoneShowForPlayer(playerid, AreaPesca, AzuL4);
GangZoneShowForPlayer(playerid, AreaDrogas, roxo);
GangZoneShowForPlayer(playerid, areadmlv, COLOR_WHITE);
//variavel
gmod[playerid] = 0;
noevento[playerid] = 0;
GPS_Spawned[playerid] = 1;
Logarprof(playerid);
autoescola[playerid] = 0;
prefls[playerid] = 0;
nautlls[playerid] = 0;
algemado[playerid] = 0;
sequestro[playerid] = 0;
vercmds[playerid]=0;
verpms[playerid]=0;
dini_IntSet(file, "convitent", 0);
dini_IntSet(file, "Entrevista", 0);
dini_IntSet(file, "MN", 0);
dini_IntSet(file, "MSenha", 0);
//fim
if(dini_Int(file, "Procurado") == 1){
Procurados[playerid]= 1;
}
if(dini_Int(file, "Procurado") == 0){
Procurados[playerid]= 0;
}
if(dini_Int(file, "VIP") == 1){
vip[playerid] = 1;
SendClientMessage(playerid, roxo, "{0099FF}[x]{CCCCFF} Vocк й um jogador VIP, veja suas vantagens digitando: /comandosvip!");
}
if(dini_Int(file, "VIP") == 0){
vip[playerid] = 0;
}
if(dini_Int(file, "Lutas") == 1){
SetPlayerFightingStyle (playerid, FIGHT_STYLE_ELBOW);
}
if(dini_Int(file, "Lutas") == 2){
SetPlayerFightingStyle (playerid, FIGHT_STYLE_BOXING);
}
if(dini_Int(file, "Lutas") == 3){
SetPlayerFightingStyle(playerid, FIGHT_STYLE_GRABKICK);
}
if(dini_Int(file, "Lutas") == 4){
SetPlayerFightingStyle (playerid, FIGHT_STYLE_KNEEHEAD);
}
if(dini_Int(file, "Lutas") == 5){
SetPlayerFightingStyle (playerid, FIGHT_STYLE_KUNGFU);
}
if(dini_Int(file, "Lutas") == 6){
SetPlayerFightingStyle (playerid, FIGHT_STYLE_NORMAL);
}
if(dini_Int(file, "Preso") == 1){
SetPlayerPos(playerid, 1587.5526,-1791.1556,30.9624); // Troca o X , Y e Z aqui e testa '-'
SetPlayerInterior(playerid, 0);
SetPlayerHealth(playerid,99999);
ResetPlayerWeapons(playerid);
TogglePlayerControllable(playerid, 1);
SendClientMessage(playerid, msgdm, "{0099FF}[x]{CCCCFF} Vocк estб preso, contrate um advogado ou pague a fianзa /fianca");
preso[playerid] = 1;
dini_IntSet(file2, "ofmaconha", 0);
dini_IntSet(file2, "vendepizza", 0);
dini_IntSet(file2, "ofcrack", 0);
dini_IntSet(file, "passarmacumba", 0);
dini_IntSet(file, "usoudroga", 0);
dini_IntSet(file, "tamacumbado", 0);
dini_IntSet(file, "tmaconha", 0);
dini_IntSet(file, "tmacumba", 0);
dini_IntSet(file, "tcrack", 0);
dini_IntSet(file, "tpizza", 0);
dini_IntSet(file, "Maconha", 0);
dini_IntSet(file, "Crack", 0);
dini_IntSet(file, "Macumba", 0);
dini_IntSet(file, "pizza", 0);
}
return 1;
}
Procura ali onde eu comentei no code /\
Reply
#8

Quote:
Originally Posted by darkxdll
Посмотреть сообщение
pawn Код:
public OnPlayerSpawn(playerid)
{
emcasa[playerid] = 0;
new aname[MAX_PLAYER_NAME];
GetPlayerName(playerid, aname, MAX_PLAYER_NAME);
format(file, sizeof(file), P_CONTAS, aname);
TextDrawHideForPlayer(playerid, topblack);
TextDrawHideForPlayer(playerid, bottomblack);
TextDrawHideForPlayer(playerid, drogas1);
TextDrawHideForPlayer(playerid, drogas2);
TextDrawShowForPlayer(playerid, DataTxT);
TextDrawShowForPlayer(playerid, HorasTxT);
//TextDrawShowForPlayer(playerid, Relogio);
SetPlayerInterior(playerid,0);
PlayerPlaySound(playerid, 1184, 0.0, 0.0, 0.0);
GangZoneShowForPlayer(playerid,favela,Amarelo);
GangZoneShowForPlayer(playerid, AreaPesca, AzuL4);
GangZoneShowForPlayer(playerid, AreaDrogas, roxo);
GangZoneShowForPlayer(playerid, areadmlv, COLOR_WHITE);
//variavel
gmod[playerid] = 0;
noevento[playerid] = 0;
GPS_Spawned[playerid] = 1;
Logarprof(playerid);
autoescola[playerid] = 0;
prefls[playerid] = 0;
nautlls[playerid] = 0;
algemado[playerid] = 0;
sequestro[playerid] = 0;
vercmds[playerid]=0;
verpms[playerid]=0;
dini_IntSet(file, "convitent", 0);
dini_IntSet(file, "Entrevista", 0);
dini_IntSet(file, "MN", 0);
dini_IntSet(file, "MSenha", 0);
//fim
if(dini_Int(file, "Procurado") == 1){
Procurados[playerid]= 1;
}
if(dini_Int(file, "Procurado") == 0){
Procurados[playerid]= 0;
}
if(dini_Int(file, "VIP") == 1){
vip[playerid] = 1;
SendClientMessage(playerid, roxo, "{0099FF}[x]{CCCCFF} Vocк й um jogador VIP, veja suas vantagens digitando: /comandosvip!");
}
if(dini_Int(file, "VIP") == 0){
vip[playerid] = 0;
}
if(dini_Int(file, "Lutas") == 1){
SetPlayerFightingStyle (playerid, FIGHT_STYLE_ELBOW);
}
if(dini_Int(file, "Lutas") == 2){
SetPlayerFightingStyle (playerid, FIGHT_STYLE_BOXING);
}
if(dini_Int(file, "Lutas") == 3){
SetPlayerFightingStyle(playerid, FIGHT_STYLE_GRABKICK);
}
if(dini_Int(file, "Lutas") == 4){
SetPlayerFightingStyle (playerid, FIGHT_STYLE_KNEEHEAD);
}
if(dini_Int(file, "Lutas") == 5){
SetPlayerFightingStyle (playerid, FIGHT_STYLE_KUNGFU);
}
if(dini_Int(file, "Lutas") == 6){
SetPlayerFightingStyle (playerid, FIGHT_STYLE_NORMAL);
}
if(dini_Int(file, "Preso") == 1){
SetPlayerPos(playerid, 1587.5526,-1791.1556,30.9624); // Troca o X , Y e Z aqui e testa '-'
SetPlayerInterior(playerid, 0);
SetPlayerHealth(playerid,99999);
ResetPlayerWeapons(playerid);
TogglePlayerControllable(playerid, 1);
SendClientMessage(playerid, msgdm, "{0099FF}[x]{CCCCFF} Vocк estб preso, contrate um advogado ou pague a fianзa /fianca");
preso[playerid] = 1;
dini_IntSet(file2, "ofmaconha", 0);
dini_IntSet(file2, "vendepizza", 0);
dini_IntSet(file2, "ofcrack", 0);
dini_IntSet(file, "passarmacumba", 0);
dini_IntSet(file, "usoudroga", 0);
dini_IntSet(file, "tamacumbado", 0);
dini_IntSet(file, "tmaconha", 0);
dini_IntSet(file, "tmacumba", 0);
dini_IntSet(file, "tcrack", 0);
dini_IntSet(file, "tpizza", 0);
dini_IntSet(file, "Maconha", 0);
dini_IntSet(file, "Crack", 0);
dini_IntSet(file, "Macumba", 0);
dini_IntSet(file, "pizza", 0);
}
return 1;
}
Procura ali onde eu comentei no code /\
Ai й se o player estiver preso. > if(dini_Int(file, "Preso") == 1){
Reply
#9

Aй Nem percebi kk'
Tenta fazer oque o Marlon disse '-'
Reply
#10

Coloque
pawn Код:
SetPlayerRandomSpawn(playerid);
em cima de return 1; do OnPlayerSpawn
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)