[Ajuda] Sistema
#1

RESOLVIDO
Reply
#2

O criador do Fs nгo matou o Tempo do roubo caso o ladrгo morra.
Topo do Gm:
new MK[MAX_PLAYERS];
pawn Код:
public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
{
    if(newkeys == 1 && IsPlayerInRangeOfPoint(playerid, 3.0, cX, cY, cZ)) // Tecla » [ \| ]
    {
        static Ladrao[MAX_PLAYER_NAME], sStr[70];
        GetPlayerName(playerid, Ladrao, sizeof(Ladrao));
        if(Roubando[playerid] == 1) return SendClientMessage(playerid, 0xE31919FF, "[~] Vocк jб estб assaltando!");
        format(sStr, sizeof(sStr), "[NOTНCIAS] %s[%d] estб roubando um local!", Ladrao, playerid);
                SendClientMessageToAll(0xE31919FF, sStr);
        format(sStr, sizeof(sStr), "Espere no local %d minutos para concluir o saqueamento!", TempoRoubo);
        SetPlayerWantedLevel(playerid, GetPlayerWantedLevel(playerid)+1);
                SendClientMessage(playerid, 0xC9C9C9FF, sStr);
        MK[playerid] = SetTimer("Roubou", 60000*TempoRoubo, false); // defini que  a variбvel Mk para o player й o SetTimer
        Roubando[playerid] = 1;
        return 1;
    }
        return 1;
}
Quando o player morrer:
pawn Код:
public OnPlayerDeath(playerid, killerid, reason)
{
        static Matou[MAX_PLAYER_NAME], Morreu[MAX_PLAYER_NAME], sStr[90];
        GetPlayerName(killerid, Matou, sizeof(Matou));
        GetPlayerName(playerid, Morreu, sizeof(Morreu));
        format(sStr, sizeof(sStr), "[NOTНCIAS] %s[%d] matou o ladrгo %s[%d]", Matou, killerid, Morreu, playerid);
        if(Roubando[playerid] == 1)
        {
            SendClientMessage(playerid, 0xE31919FF, "[~] Vocк morreu quando estava roubando!");
            Roubando[playerid] = 0;
            KillTimer(MK[playerid]);// Matando o Tempo
            return 1;
        }
        if(Roubando[killerid] == 1)
        {
            SendClientMessage(playerid, 0xE31919FF, "[~] Vocк matou o ladrгo!");
            Roubando[killerid] = 0;
            return 1;
        }
        return 1;
}
Reply
#3

Deu certo, mas nгo estб indo para hospital quando eu morro =/ =/
Reply
#4

SetPlayerPos
Reply
#5

O hospital й por contagem, quando vocк morre aparece na tela 5 segundos e quando acaba vocк nasce em um hospital, sendo que nгo estб aparecendo a contagem para vocк nascer no hospital e nem nascendo no hospital, estб nascendo no mesmo local quando eu faзo o login =/
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)