[AJUDA]OnPlayerSpawn
#1

Galera queria saber oque estб de errado no OnPlayerSpawn porque quando boto um cara de lv 3 de RRB = Repуrter quando ele morre volta pra level 1

Код:
        if(levelrrb[playerid] >= 1 || PlayerInfo[playerid][pRRB] >= 1)
        {
        //REPУRTERES
                        SetPlayerInterior(playerid,0);
                        SetPlayerPos(playerid,749.1455,-1346.5336,13.5140);
                        GameTextForPlayer(playerid,"~W~BEM VINDO~h~ ~y~Reporter !", 1000,1);
                        GivePlayerWeapon(playerid,24,999999);
                        GivePlayerWeapon(playerid,27,999999);
                        GivePlayerWeapon(playerid,29,999999);
                        GivePlayerWeapon(playerid,30,999999);
                        GivePlayerWeapon(playerid,34,999999);
                        GivePlayerWeapon(playerid,0,999999);
                        SetPlayerArmour(playerid, 300.0);
                        SetPlayerColor(playerid, COR_RRB);
                        SetPlayerSkin(playerid, 187);
                        SetPlayerHealth(playerid, 300.0);
                        SetPlayerVirtualWorld(playerid, 0);
                        TogglePlayerControllable(playerid,1);
                        SendClientMessage(playerid, COLOR_WHITE, "Use /comandosrrb, para ver os comandos de Repуrter!");
                        //levelrrb[playerid] = 1;
                        PlayerInfo[playerid][pRRB] = 1;
                        GetPlayerName(playerid, sendername, sizeof(sendername));
                        return dini_IntSet(udb_encode(sendername), "levelrrb", levelrrb[playerid]);
        }
OBS: Meu OnPlayerDeath nгo tem nenhum code!
Reply
#2

Tire o:
PHP код:
PlayerInfo[playerid][pRRB] = 1
Reply
#3

Й arrumou sу que quando saiu do server meu lv vai pra 0 :/

Antes que peзa

OnPlayerDisconnect
Код:
public OnPlayerDisconnect(playerid, reason)
{

    logged[playerid] = 0;
        logado[playerid] = 0;


        #if Leavemessages == true
        DestroyObject(objectid);
        new PlayerName[30], string[256];
        switch (reason)
        new pname[24];
    GetPlayerName(playerid, pname, sizeof pname);
        {
                case 0:
        {
            if(SilentBanKick[playerid] == 0)
            {
                                GetPlayerName(playerid, PlayerName, sizeof(PlayerName));
                                format(string, 256, "%s(%i) saiu do server! (Crash/Conexгo)", PlayerName);
                                SendClientMessageToAll(leavemessagecolor, string);
                        }
                }
                case 1:
                {
                        if(SilentBanKick[playerid] == 0)
            {
                                GetPlayerName(playerid, PlayerName, sizeof(PlayerName));
                                format(string, 256, "%s(%i) saiu do server! (Saindo...)", PlayerName);
                                SendClientMessageToAll(leavemessagecolor, string);
                        }
                }
                case 2:
                {
                        if(SilentBanKick[playerid] == 0)
            {
                                GetPlayerName(playerid, PlayerName, sizeof(PlayerName));
                                format(string, 256, "%s(%i) fez merda e foi kickado/banido! (Kick/Ban)", PlayerName);
                                SendClientMessageToAll(leavemessagecolor, string);
                        }
                }
        }

       #endif
}
Reply
#4

Posta o OnPlayerConnect
Reply
#5

Код:
public OnPlayerConnect(playerid)
{
		new PlayerName[24];
        GetPlayerName(playerid, PlayerName, sizeof(PlayerName));
    if(!dini_Exists(udb_encode(PlayerName)))
        {
		ShowPlayerDialog(playerid,4,DIALOG_STYLE_MSGBOX,"AVISO:","Vocк nгo й registrado, use /registrar [senha] para se registrar.", "Ok", "Cancelar");
        }else
        {
		ShowPlayerDialog(playerid,5,DIALOG_STYLE_MSGBOX,"AVISO:","Vocк й registrado, use /login [senha] para se logar.", "Ok", "Cancelar");
        }
		{
		GameTextForPlayer(playerid, "~g~ Bem Vindo Novamente", 2000, 2);
		GameTextForPlayer(playerid, "%s", 1000, 2, PlayerName);
		}
        logged[playerid] = 0;
        logado[playerid] = 0;



        #if JOIN_MESSAGES == true
        format(string, sizeof(string),"%s entrou no no server.", PlayerName, playerid);
        SendClientMessageToAll(COLOR_RED, string);
        BanCheck(playerid);
        TempBanCheck(playerid);
        new pname[24];
    GetPlayerName(playerid, pname, sizeof pname);



		SetPlayerMapIcon(playerid, 30, -2894.6692, 462.5114, 4.9141, 52, 0, MAPICON_LOCAL);

    
        #endif
        return 1;
}
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)