SA-MP Forums Archive
[AJUDA]OnPlayerUpdate (Nгo consigo resolver) :@ - 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]OnPlayerUpdate (Nгo consigo resolver) :@ (/showthread.php?tid=294909)



[AJUDA]OnPlayerUpdate (Nгo consigo resolver) :@ - ReDKiiL - 03.11.2011

Olhem O Code Fis So Para Testar:

pawn Код:
public OnPlayerUpdate(playerid)
{
    if(PlayerInfo[playerid][GODCAR] == 1){
    if(!VAreos(GetVehicleModel(GetPlayerVehicleID(playerid))))
    {
    RepairVehicle(GetPlayerVehicleID(playerid));
    }
    }
    if(GetPlayerWeapon(playerid) == 36){Kick(playerid); }
    return 1;
}
Print:

http://i.imgur.com/DPEBU.png

Fica Pulando a Linha Na Hora Do Kick :@

Meu Deus Nao Consigo Resolver Isso BUG CHATO :@


Re: [AJUDA]AFF NAO CONSIGO RESOLVER :@ - steki. - 03.11.2011

img off


Re: [AJUDA]AFF NAO CONSIGO RESOLVER :@ - ReDKiiL - 03.11.2011

Quote:
Originally Posted by Stewie`
Посмотреть сообщение
img off
Aqui Nem Ta :S


Re: [AJUDA]AFF NAO CONSIGO RESOLVER :@ - Hardware - 03.11.2011

Aqui tambйm nгo.
Red, o que tu pode tentar fazer й colocar uma mensagem pro servidor na hora em que ele for kickado, assim nгo ficara um espaзo ali.


Re: [AJUDA]AFF NAO CONSIGO RESOLVER :@ - PlueX - 03.11.2011

Tente isso;

pawn Код:
public OnPlayerUpdate(playerid)
{
    if(PlayerInfo[playerid][GODCAR] == 1) {
        if(!VAreos(GetVehicleModel(GetPlayerVehicleID(playerid)))) {
            RepairVehicle(GetPlayerVehicleID(playerid));
        }
    }
    if(GetPlayerWeapon(playerid) == 36) {
        new pName[MAX_PLAYER_NAME];
        new string[128];
        GetPlayerName(playerid, pName, MAX_PLAYER_NAME);
        format(string,128,"%s Foi kickado pelo administrador BOT.",pName);
        SendClientMessageToAll(0xFF0000AA,string);
        Kick(playerid);
    }
    return 1;
}



Re: [AJUDA]AFF NAO CONSIGO RESOLVER :@ - ReDKiiL - 03.11.2011

Quote:
Originally Posted by PlueX
Посмотреть сообщение
Tente isso;

pawn Код:
public OnPlayerUpdate(playerid)
{
    if(PlayerInfo[playerid][GODCAR] == 1) {
        if(!VAreos(GetVehicleModel(GetPlayerVehicleID(playerid)))) {
            RepairVehicle(GetPlayerVehicleID(playerid));
        }
    }
    if(GetPlayerWeapon(playerid) == 36) {
        new pName[MAX_PLAYER_NAME];
        new string[128];
        GetPlayerName(playerid, pName, MAX_PLAYER_NAME);
        format(string,128,"%s Foi kickado pelo administrador BOT.",pName);
        SendClientMessageToAll(0xFF0000AA,string);
        Kick(playerid);
    }
    return 1;
}
http://i.imgur.com/YbOX3.png


mesma coisa :S


Re: [AJUDA]AFF NAO CONSIGO RESOLVER :@ - steki. - 03.11.2011

Isso nгo tem nada a ver com essse codigo.

Que tal comeзarmos com o OnPlayerDisconnect?


Re: [AJUDA]AFF NAO CONSIGO RESOLVER :@ - ReDKiiL - 03.11.2011

OnPlayerDisconect

:

pawn Код:
public OnPlayerDisconnect(playerid, reason)
{
    SalvarPlayer(playerid);
    SendDeathMessage(INVALID_PLAYER_ID,playerid,201);
    DestroyVehicle(GetPVarInt(playerid,"Veiculo"));
    if(ServerInfo[ConectMsg] == 1){
    new string[76];
    GetPlayerName(playerid,NomeP,sizeof(NomeP));
    switch(reason)
    {
    case 0: format(string, sizeof(string),"[HS]--> %s Saiu Do Servidor (Caiu a Conexгo Ou Crash)",NomeP);
    case 1: format(string, sizeof(string),"[HS]--> %s Saiu Do Servidor",NomeP);
    }
    SendClientMessageToAll(cinza,string);
    }
    return 1;
}



Re: [AJUDA]AFF NAO CONSIGO RESOLVER :@ - PlueX - 03.11.2011

pawn Код:
public OnPlayerDisconnect(playerid, reason)
{
    SalvarPlayer(playerid);
    SendDeathMessage(INVALID_PLAYER_ID,playerid,201);
    DestroyVehicle(GetPVarInt(playerid,"Veiculo"));
    if(ServerInfo[ConectMsg] == 1){
    new string[76];
    GetPlayerName(playerid,NomeP,sizeof(NomeP));
    switch(reason)
    {
    case 0: format(string, sizeof(string),"[HS]--> %s Saiu Do Servidor (Caiu a Conexгo Ou Crash)",NomeP);
    case 1: format(string, sizeof(string),"[HS]--> %s Saiu Do Servidor",NomeP);
    case 2: format(string, sizeof(string),"[HS]--> %s Saiu Do Servidor(Foi banido)",NomeP);
    }
    SendClientMessageToAll(cinza,string);
    }
    return 1;
}



Re: [AJUDA]AFF NAO CONSIGO RESOLVER :@ - ReDKiiL - 03.11.2011

Quote:
Originally Posted by PlueX
Посмотреть сообщение
pawn Код:
public OnPlayerDisconnect(playerid, reason)
{
    SalvarPlayer(playerid);
    SendDeathMessage(INVALID_PLAYER_ID,playerid,201);
    DestroyVehicle(GetPVarInt(playerid,"Veiculo"));
    if(ServerInfo[ConectMsg] == 1){
    new string[76];
    GetPlayerName(playerid,NomeP,sizeof(NomeP));
    switch(reason)
    {
    case 0: format(string, sizeof(string),"[HS]--> %s Saiu Do Servidor (Caiu a Conexгo Ou Crash)",NomeP);
    case 1: format(string, sizeof(string),"[HS]--> %s Saiu Do Servidor",NomeP);
    case 2: format(string, sizeof(string),"[HS]--> %s Saiu Do Servidor(Foi banido)",NomeP);
    }
    SendClientMessageToAll(cinza,string);
    }
    return 1;
}
Deu Certo Mais Nao Quero Que Aparece Uma Msg Quando For Kickado ;S
Tem Outra Opзao ?