[Ajuda] stay within the world boundaries
#1

Sou iniciante em Pawn e estou prescisando de ajuda.
Decidi fazer do 0 do que baixar e sair editando, li sobre algumas funзхes e tudo,
mais equi estб dando um erro diferente e que nгo consegui arrumar,
й o seguinte da pra entrar no server e td mais quando morre,
as cores embolam e fica aparecendo "stay within the world boundaries"
procurei aqui no forum e nгo achei algo relacionado a isso.

Alguem pode ajudar?

pawn Код:
public OnPlayerSpawn(playerid)
{
    if(gHospitalInfo[playerid][MorreuHospital] == 1)
    {
    SetPlayerPos(playerid, 275.2320,1859.6525,9.8133);
    SetPlayerInterior(playerid, 0);
    TogglePlayerControllable(playerid, 0);
    ApplyAnimation(playerid, "CRACK", "crckdeth2", 4.0, 1, 0, 0, 0, 0);
    GameTextForPlayer(playerid, "~n~~n~~n~~n~~n~~n~~n~~n~~n~~w~Voce precisa ~r~descansar ~w~agora...", 15000, 3);
    SetTimerEx("TempoHospital", 15000, false, "i", playerid);
    gHospitalInfo[playerid][FoiHospital] += 1;
    return 1;
    }
    TextDrawShowForPlayer(playerid, UPRelogio[playerid]);
    return 1;
}
acho que o erro deve ser ai pq sу ocorre na hora do spawn apуs a morte do player.
Reply
#2

stay within the world boundaries = permanecer dentro dos limites do mundo

deve ser algo relacionado ao mundo virtual do player.

Olha na public onplayerdeath
Reply
#3

cara esse gm nao e do > 0 por que se fosse vc saberia aonde estar saindo essa mensagem !

vou te falar procure na
OnPlayerDeath deve esta lah!
Reply
#4

esse sistema de Hospital que eu vi aqui no forum e peguei,
o GM estб vazio

pawn Код:
public OnPlayerDeath(playerid, killerid, reason)
{
    gHospitalInfo[playerid][MorreuHospital] = 1;
    return 1;
}
Reply
#5

cara posta o sistema de hospital ae !
Reply
#6

Como vocк declarou o ghospitalinfo??
Reply
#7

pawn Код:
//Nгo retire os crйditos - By Ghost_
#include <a_samp>
#include <Dini>
 
#define COR_VERMELHO 0xFF8080FF
#define HINFO 1561
#define GH "gH/%s.ini"
forward TempoHospital(playerid);
 
enum gHInfo
{
    MorreuHospital,
    FoiHospital,
    PagouHospital,
};
new gHospitalInfo[MAX_PLAYERS][gHInfo];
 
public OnPlayerConnect(playerid)
{
    new Nome[MAX_PLAYER_NAME];
    GetPlayerName(playerid, Nome, sizeof(Nome));
    new str[20];
    format(str, sizeof(str), GH, Nome);
    if(!dini_Exists(str))
    {
        dini_Create(str);
        dini_IntSet(str,"MorreuHospital",0);
        dini_IntSet(str,"FoiHospital",0);
        dini_IntSet(str,"PagouHospital",0);
    }
    else
    {
        gHospitalInfo[playerid][MorreuHospital] = dini_Int(str, "MorreuHospital");
        gHospitalInfo[playerid][FoiHospital] = dini_Int(str, "FoiHospital");
        gHospitalInfo[playerid][PagouHospital] = dini_Int(str, "PagouHospital");
    }
    return 1;
}
 
public OnPlayerDisconnect(playerid, reason)
{
    new Nome[MAX_PLAYER_NAME];
    GetPlayerName(playerid, Nome, sizeof(Nome));
    new str[20];
    format(str, sizeof(str), GH, Nome);
    dini_IntSet(str,"MorreuHospital", gHospitalInfo[playerid][MorreuHospital]);
    dini_IntSet(str,"PagouHospital", gHospitalInfo[playerid][PagouHospital]);
    dini_IntSet(str,"FoiHospital", gHospitalInfo[playerid][FoiHospital]);
    return 1;
}
 
public OnPlayerSpawn(playerid)
{
    if(gHospitalInfo[playerid][MorreuHospital] == 1)
    {
        SetPlayerPos(playerid, 275.2320,1859.6525,9.8133);
        TogglePlayerControllable(playerid, 0);
        ApplyAnimation(playerid, "CRACK", "crckdeth2", 4.0, 1, 0, 0, 0, 0);
        GameTextForPlayer(playerid, "~n~~n~~n~~n~~n~~n~~n~~n~~n~~w~Voce precisa ~r~descansar ~w~agora...", 15000, 3);
        SetTimerEx("TempoHospital", 15000, false, "i", playerid);
        gHospitalInfo[playerid][FoiHospital] += 1;
        return 1;
    }
    return 1;
}
 
public OnPlayerDeath(playerid, killerid, reason)
{
    gHospitalInfo[playerid][MorreuHospital] = 1;
    return 1;
}
 
public OnPlayerCommandText(playerid, cmdtext[])
{
    if (strcmp("/hinfo", cmdtext, true, 10) == 0)
    {
        new string[256];
        format(string, sizeof(string), "{FFFFFF}Vocк visitou o Hospital de All Saints {FF8080}%d vezes.\n{FFFFFF}Vocк pagou {00FF00}$%d {FFFFFF}para o Hospital de All Saints.", gHospitalInfo[playerid][FoiHospital],gHospitalInfo[playerid][PagouHospital]);
        ShowPlayerDialog(playerid,HINFO,DIALOG_STYLE_MSGBOX,"All Saints Hospital",string,"Fechar","");
        return 1;
    }
    return 0;
}
 
public TempoHospital(playerid)
{
    SendClientMessage(playerid, -1, "Doutor diz: Vocк jб estб se sentindo melhor, pode ir para casa.");
    SendClientMessage(playerid, COR_VERMELHO, "* Fatura mйdica custou $200.");
    gHospitalInfo[playerid][PagouHospital] += 200;
    GivePlayerMoney(playerid, -200);
    SpawnPlayer(playerid);
    ClearAnimations(playerid);
    TogglePlayerControllable(playerid, 1);
    SetPlayerPos(playerid, 1182.5638,-1323.5256,13.5790);
    SetPlayerFacingAngle(playerid, 270.0);
    SetPlayerInterior(playerid,0);
    gHospitalInfo[playerid][MorreuHospital] = 0;
    return 1;
}
Reply
#8

hum...
vc esta usando so o gm ae ouu algum fs
Reply
#9

somente o GM vazio com esse sistema
Reply
#10

Faзa um debug e certifique-se que ele nгo esta sendo setado em uma posiзгo 'Maior' que o 'Limite'.
Reply


Forum Jump:


Users browsing this thread: 4 Guest(s)