Error if connect (Rep+)
#1

Why if i connect to server i have double information ? like this



And here are the code's
Код:
if(PlayerInfo[playerid][pTut] == 1)
		{
		    if(PlayerInfo[playerid][pSafeSpawn] == 1 && PlayerInfo[playerid][pSPECN] == 1)
			{//FINISHED TUTORIAL
				//FadeColorForPlayer(playerid,0,0,0,0,0,0,0,255,15,0);
				SetPlayerInterior(playerid,0);
				SetPlayerVirtualWorld(playerid, 0);
				SetPlayerPos(playerid,1806.5427,-1575.5707,13.4493);
				SetPlayerFacingAngle(playerid, 260);
				SetCameraBehindPlayer(playerid);
				PlayerInfo[playerid][pSafeSpawn] = 0;
				PlayerInfo[playerid][pSPECN] = 0;
				SetPlayerSkin(playerid, 59);
				ApplyAnimation(playerid,"PED","WALK_GANG1",4.1,1,1,1,50,1);
				StopAudioStreamForPlayer(playerid);
			}
			else if(PlayerInfo[playerid][pSafeSpawn] == 0 && PlayerInfo[playerid][pSPECN] == 0)
			{//RELOGGING
			    HideArea(playerid);
				SetPlayerArmour(playerid, PlayerInfo[playerid][pArmor]);
				SetPlayerInterior(playerid, PlayerInfo[playerid][pInt]);
				SetPlayerPos(playerid, PlayerInfo[playerid][pSPos_x], PlayerInfo[playerid][pSPos_y], PlayerInfo[playerid][pSPos_z]);
				SetPlayerFacingAngle(playerid, PlayerInfo[playerid][pSPos_r]);
				SetCameraBehindPlayer(playerid);
                StopAudioStreamForPlayer(playerid);
                //TogglePlayerSpectating(playerid, 0);
				FadeColorForPlayer(playerid,0,0,0,255,0,0,0,0,15,0);
				new string[128];
    			// Welcome
			    format(string, sizeof(string), "SERVER: {FFFFFF}Welcome to GoGamers Roleplay {FF6347}%s{FFFFFF}.", RPN(playerid));
				SendClientMessage(playerid, COLOR_NICEGREEN, string);
				// Player
				format(string, sizeof(string), "SERVER: {FFFFFF}You are logged in as a player with %d playing hours.", PlayerInfo[playerid][pLevel]);
    			SendClientMessage(playerid, COLOR_NICEGREEN, string);
			    // Helper
			    if(PlayerInfo[playerid][pHelper]){
			    format(string, sizeof(string), "SERVER: {FFFFFF}You are logged in as level %d helper.", PlayerInfo[playerid][pHelper]);
			    SendClientMessage(playerid, COLOR_NICEGREEN, string);}
			    // VIP
			    if(PlayerInfo[playerid][pDonateRank]){
			    format(string, sizeof(string), "SERVER: {FFFFFF}You are logged in as a level %d Donor.", PlayerInfo[playerid][pDonateRank]);
			    SendClientMessage(playerid, COLOR_NICEGREEN, string);}
			    // Famed
			    if(PlayerInfo[playerid][pFamed]){
				SendClientMessage(playerid, COLOR_NICEGREEN,"SERVER: {FFFFFF}You are logged in as a Famed Player.");}
				// Developer
    			if(PlayerInfo[playerid][pDeveloper]){
			    format(string, sizeof(string), "SERVER: {FFFFFF}You are logged in as a level %d Devloper.", PlayerInfo[playerid][pDeveloper]);
			    SendClientMessage(playerid, COLOR_NICEGREEN, string);}
   				// Mappers
    			if(PlayerInfo[playerid][pMapper]){
			    format(string, sizeof(string), "SERVER: {FFFFFF}You are logged in as a level %d Mapper.", PlayerInfo[playerid][pMapper]);
			    SendClientMessage(playerid, COLOR_NICEGREEN, string);}
			    // Admin
			    if(PlayerInfo[playerid][pAdmin]){
				format(string, sizeof(string), "SERVER: {FFFFFF}You are logged in as level %d administrator.", PlayerInfo[playerid][pAdmin]);
			 	SendClientMessage(playerid, COLOR_NICEGREEN, string);}
			    // Admin Messages
			    if(PlayerInfo[playerid][pAdmin]){
				format(string, sizeof(string), "AdmLogin: Administrator %s has logged in. (Adminstration Level : %d)", RPN(playerid), PlayerInfo[playerid][pAdmin]);
				SendAdminMessage(COLOR_LIGHTBLUE, string);}
			}
			CanTalk[playerid] = 1;
			SetPlayerToTeamColor(playerid);
		}
	}
	return 1;
}
Reply
#2

Can you show OnplayerConnect call back and your ONPlayerLogin something?
Reply
#3

Quote:
Originally Posted by ToiletDuck
Посмотреть сообщение
Can you show OnplayerConnect call back and your ONPlayerLogin something?
Look, i was adding the code's
Reply
#4

pawn Код:
if(PlayerInfo[playerid][pDonateRank]){
                format(string, sizeof(string), "SERVER: {FFFFFF}You are logged in as a level %d Donor.", PlayerInfo[playerid][pDonateRank]);
                SendClientMessage(playerid, COLOR_NICEGREEN, string);}
Add "else if" after Player Accounts Like this:


pawn Код:
if(PlayerInfo[playerid][pHelper]){
                format(string, sizeof(string), "SERVER: {FFFFFF}You are logged in as level %d helper.", PlayerInfo[playerid][pHelper]);
                SendClientMessage(playerid, COLOR_NICEGREEN, string);}
                // VIP
               else if(PlayerInfo[playerid][pDonateRank]){
                format(string, sizeof(string), "SERVER: {FFFFFF}You are logged in as a level %d Donor.", PlayerInfo[playerid][pDonateRank]);
                SendClientMessage(playerid, COLOR_NICEGREEN, string);}
                // Famed
                else if(PlayerInfo[playerid][pFamed]){
                SendClientMessage(playerid, COLOR_NICEGREEN,"SERVER: {FFFFFF}You are logged in as a Famed Player.");}
                // Developer
                else if(PlayerInfo[playerid][pDeveloper]){
                format(string, sizeof(string), "SERVER: {FFFFFF}You are logged in as a level %d Devloper.", PlayerInfo[playerid][pDeveloper]);
                SendClientMessage(playerid, COLOR_NICEGREEN, string);}
                // Mappers
                else if(PlayerInfo[playerid][pMapper]){
                format(string, sizeof(string), "SERVER: {FFFFFF}You are logged in as a level %d Mapper.", PlayerInfo[playerid][pMapper]);
                SendClientMessage(playerid, COLOR_NICEGREEN, string);}
                // Admin
                else if(PlayerInfo[playerid][pAdmin]){
                format(string, sizeof(string), "SERVER: {FFFFFF}You are logged in as level %d administrator.", PlayerInfo[playerid][pAdmin]);
                SendClientMessage(playerid, COLOR_NICEGREEN, string);}
                // Admin Messages
                else if(PlayerInfo[playerid][pAdmin]){
                format(string, sizeof(string), "AdmLogin: Administrator %s has logged in. (Adminstration Level : %d)", RPN(playerid), PlayerInfo[playerid][pAdmin]);
                SendAdminMessage(COLOR_LIGHTBLUE, string);}
            }
Did'nt tested i guess it work's.
Reply
#5

i didn't see any problem there but try returning it

pawn Код:
if(PlayerInfo[playerid][pTut] == 1)
        {
            if(PlayerInfo[playerid][pSafeSpawn] == 1 && PlayerInfo[playerid][pSPECN] == 1)
            {//FINISHED TUTORIAL
                //FadeColorForPlayer(playerid,0,0,0,0,0,0,0,255,15,0);
                SetPlayerInterior(playerid,0);
                SetPlayerVirtualWorld(playerid, 0);
                SetPlayerPos(playerid,1806.5427,-1575.5707,13.4493);
                SetPlayerFacingAngle(playerid, 260);
                SetCameraBehindPlayer(playerid);
                PlayerInfo[playerid][pSafeSpawn] = 0;
                PlayerInfo[playerid][pSPECN] = 0;
                SetPlayerSkin(playerid, 59);
                ApplyAnimation(playerid,"PED","WALK_GANG1",4.1,1,1,1,50,1);
                StopAudioStreamForPlayer(playerid);
            }
            else if(PlayerInfo[playerid][pSafeSpawn] == 0 && PlayerInfo[playerid][pSPECN] == 0)
            {//RELOGGING
                HideArea(playerid);
                SetPlayerArmour(playerid, PlayerInfo[playerid][pArmor]);
                SetPlayerInterior(playerid, PlayerInfo[playerid][pInt]);
                SetPlayerPos(playerid, PlayerInfo[playerid][pSPos_x], PlayerInfo[playerid][pSPos_y], PlayerInfo[playerid][pSPos_z]);
                SetPlayerFacingAngle(playerid, PlayerInfo[playerid][pSPos_r]);
                SetCameraBehindPlayer(playerid);
                StopAudioStreamForPlayer(playerid);
                //TogglePlayerSpectating(playerid, 0);
                FadeColorForPlayer(playerid,0,0,0,255,0,0,0,0,15,0);
                new string[128];
                // Helper
                if(PlayerInfo[playerid][pHelper]){
                    format(string, sizeof(string), "SERVER: {FFFFFF}You are logged in as level %d helper.", PlayerInfo[playerid][pHelper]);
                    SendClientMessage(playerid, COLOR_NICEGREEN, string);
                }
                // VIP
                if(PlayerInfo[playerid][pDonateRank]){
                    format(string, sizeof(string), "SERVER: {FFFFFF}You are logged in as a level %d Donor.", PlayerInfo[playerid][pDonateRank]);
                    SendClientMessage(playerid, COLOR_NICEGREEN, string);
                }
                // Famed
                if(PlayerInfo[playerid][pFamed]){
                    SendClientMessage(playerid, COLOR_NICEGREEN,"SERVER: {FFFFFF}You are logged in as a Famed Player.");
                }
                // Developer
                if(PlayerInfo[playerid][pDeveloper]){
                    format(string, sizeof(string), "SERVER: {FFFFFF}You are logged in as a level %d Devloper.", PlayerInfo[playerid][pDeveloper]);
                    SendClientMessage(playerid, COLOR_NICEGREEN, string);
                }
                // Mappers
                if(PlayerInfo[playerid][pMapper]){
                    format(string, sizeof(string), "SERVER: {FFFFFF}You are logged in as a level %d Mapper.", PlayerInfo[playerid][pMapper]);
                    SendClientMessage(playerid, COLOR_NICEGREEN, string);
                }
                // Admin
                if(PlayerInfo[playerid][pAdmin]){
                    format(string, sizeof(string), "SERVER: {FFFFFF}You are logged in as level %d administrator.", PlayerInfo[playerid][pAdmin]);
                    SendClientMessage(playerid, COLOR_NICEGREEN, string);
                }
                // Admin Messages
                if(PlayerInfo[playerid][pAdmin]){
                    format(string, sizeof(string), "AdmLogin: Administrator %s has logged in. (Adminstration Level : %d)", RPN(playerid), PlayerInfo[playerid][pAdmin]);
                    SendAdminMessage(COLOR_LIGHTBLUE, string);
                }
                // Welcome
                format(string, sizeof(string), "SERVER: {FFFFFF}Welcome to GoGamers Roleplay {FF6347}%s{FFFFFF}.", RPN(playerid));
                SendClientMessage(playerid, COLOR_NICEGREEN, string);
                // Player
                format(string, sizeof(string), "SERVER: {FFFFFF}You are logged in as a player with %d playing hours.", PlayerInfo[playerid][pLevel]);
                SendClientMessage(playerid, COLOR_NICEGREEN, string);
                return 1; // Hmm now test this., i think this is the problem you didn't return it..
            }
            CanTalk[playerid] = 1;
            SetPlayerToTeamColor(playerid);
        }
    }
    return 1;
Reply
#6

Quote:
Originally Posted by Raza2013
Посмотреть сообщение
pawn Код:
if(PlayerInfo[playerid][pDonateRank]){
                format(string, sizeof(string), "SERVER: {FFFFFF}You are logged in as a level %d Donor.", PlayerInfo[playerid][pDonateRank]);
                SendClientMessage(playerid, COLOR_NICEGREEN, string);}
Add "else if" after Player Accounts Like this:


pawn Код:
if(PlayerInfo[playerid][pHelper]){
                format(string, sizeof(string), "SERVER: {FFFFFF}You are logged in as level %d helper.", PlayerInfo[playerid][pHelper]);
                SendClientMessage(playerid, COLOR_NICEGREEN, string);}
                // VIP
               else if(PlayerInfo[playerid][pDonateRank]){
                format(string, sizeof(string), "SERVER: {FFFFFF}You are logged in as a level %d Donor.", PlayerInfo[playerid][pDonateRank]);
                SendClientMessage(playerid, COLOR_NICEGREEN, string);}
                // Famed
                else if(PlayerInfo[playerid][pFamed]){
                SendClientMessage(playerid, COLOR_NICEGREEN,"SERVER: {FFFFFF}You are logged in as a Famed Player.");}
                // Developer
                else if(PlayerInfo[playerid][pDeveloper]){
                format(string, sizeof(string), "SERVER: {FFFFFF}You are logged in as a level %d Devloper.", PlayerInfo[playerid][pDeveloper]);
                SendClientMessage(playerid, COLOR_NICEGREEN, string);}
                // Mappers
                else if(PlayerInfo[playerid][pMapper]){
                format(string, sizeof(string), "SERVER: {FFFFFF}You are logged in as a level %d Mapper.", PlayerInfo[playerid][pMapper]);
                SendClientMessage(playerid, COLOR_NICEGREEN, string);}
                // Admin
                else if(PlayerInfo[playerid][pAdmin]){
                format(string, sizeof(string), "SERVER: {FFFFFF}You are logged in as level %d administrator.", PlayerInfo[playerid][pAdmin]);
                SendClientMessage(playerid, COLOR_NICEGREEN, string);}
                // Admin Messages
                else if(PlayerInfo[playerid][pAdmin]){
                format(string, sizeof(string), "AdmLogin: Administrator %s has logged in. (Adminstration Level : %d)", RPN(playerid), PlayerInfo[playerid][pAdmin]);
                SendAdminMessage(COLOR_LIGHTBLUE, string);}
            }
Did'nt tested i guess it work's.
I Have 2 error .
Код:
D:\New Server\raven\gamemodes\U-RP.pwn(29922) : error 029: invalid expression, assumed zero
D:\New Server\raven\gamemodes\U-RP.pwn(29922) : warning 215: expression has no effect
D:\New Server\raven\gamemodes\U-RP.pwn(29922) : error 001: expected token: ";", but found "if"
Reply
#7

Quote:
Originally Posted by ToiletDuck
Посмотреть сообщение
i didn't see any problem there but try returning it

pawn Код:
if(PlayerInfo[playerid][pTut] == 1)
        {
            if(PlayerInfo[playerid][pSafeSpawn] == 1 && PlayerInfo[playerid][pSPECN] == 1)
            {//FINISHED TUTORIAL
                //FadeColorForPlayer(playerid,0,0,0,0,0,0,0,255,15,0);
                SetPlayerInterior(playerid,0);
                SetPlayerVirtualWorld(playerid, 0);
                SetPlayerPos(playerid,1806.5427,-1575.5707,13.4493);
                SetPlayerFacingAngle(playerid, 260);
                SetCameraBehindPlayer(playerid);
                PlayerInfo[playerid][pSafeSpawn] = 0;
                PlayerInfo[playerid][pSPECN] = 0;
                SetPlayerSkin(playerid, 59);
                ApplyAnimation(playerid,"PED","WALK_GANG1",4.1,1,1,1,50,1);
                StopAudioStreamForPlayer(playerid);
            }
            else if(PlayerInfo[playerid][pSafeSpawn] == 0 && PlayerInfo[playerid][pSPECN] == 0)
            {//RELOGGING
                HideArea(playerid);
                SetPlayerArmour(playerid, PlayerInfo[playerid][pArmor]);
                SetPlayerInterior(playerid, PlayerInfo[playerid][pInt]);
                SetPlayerPos(playerid, PlayerInfo[playerid][pSPos_x], PlayerInfo[playerid][pSPos_y], PlayerInfo[playerid][pSPos_z]);
                SetPlayerFacingAngle(playerid, PlayerInfo[playerid][pSPos_r]);
                SetCameraBehindPlayer(playerid);
                StopAudioStreamForPlayer(playerid);
                //TogglePlayerSpectating(playerid, 0);
                FadeColorForPlayer(playerid,0,0,0,255,0,0,0,0,15,0);
                new string[128];
                // Helper
                if(PlayerInfo[playerid][pHelper]){
                    format(string, sizeof(string), "SERVER: {FFFFFF}You are logged in as level %d helper.", PlayerInfo[playerid][pHelper]);
                    SendClientMessage(playerid, COLOR_NICEGREEN, string);
                }
                // VIP
                if(PlayerInfo[playerid][pDonateRank]){
                    format(string, sizeof(string), "SERVER: {FFFFFF}You are logged in as a level %d Donor.", PlayerInfo[playerid][pDonateRank]);
                    SendClientMessage(playerid, COLOR_NICEGREEN, string);
                }
                // Famed
                if(PlayerInfo[playerid][pFamed]){
                    SendClientMessage(playerid, COLOR_NICEGREEN,"SERVER: {FFFFFF}You are logged in as a Famed Player.");
                }
                // Developer
                if(PlayerInfo[playerid][pDeveloper]){
                    format(string, sizeof(string), "SERVER: {FFFFFF}You are logged in as a level %d Devloper.", PlayerInfo[playerid][pDeveloper]);
                    SendClientMessage(playerid, COLOR_NICEGREEN, string);
                }
                // Mappers
                if(PlayerInfo[playerid][pMapper]){
                    format(string, sizeof(string), "SERVER: {FFFFFF}You are logged in as a level %d Mapper.", PlayerInfo[playerid][pMapper]);
                    SendClientMessage(playerid, COLOR_NICEGREEN, string);
                }
                // Admin
                if(PlayerInfo[playerid][pAdmin]){
                    format(string, sizeof(string), "SERVER: {FFFFFF}You are logged in as level %d administrator.", PlayerInfo[playerid][pAdmin]);
                    SendClientMessage(playerid, COLOR_NICEGREEN, string);
                }
                // Admin Messages
                if(PlayerInfo[playerid][pAdmin]){
                    format(string, sizeof(string), "AdmLogin: Administrator %s has logged in. (Adminstration Level : %d)", RPN(playerid), PlayerInfo[playerid][pAdmin]);
                    SendAdminMessage(COLOR_LIGHTBLUE, string);
                }
                // Welcome
                format(string, sizeof(string), "SERVER: {FFFFFF}Welcome to GoGamers Roleplay {FF6347}%s{FFFFFF}.", RPN(playerid));
                SendClientMessage(playerid, COLOR_NICEGREEN, string);
                // Player
                format(string, sizeof(string), "SERVER: {FFFFFF}You are logged in as a player with %d playing hours.", PlayerInfo[playerid][pLevel]);
                SendClientMessage(playerid, COLOR_NICEGREEN, string);
                return 1; // Hmm now test this., i think this is the problem you didn't return it..
            }
            CanTalk[playerid] = 1;
            SetPlayerToTeamColor(playerid);
        }
    }
    return 1;
Nothing happened lol i have same bug
Reply
#8

Then the only way is this
CTRL+F 'You are logged in as a player with' check if it doubles..
Reply
#9

Quote:
Originally Posted by ToiletDuck
Посмотреть сообщение
Then the only way is this
CTRL+F 'You are logged in as a player with' check if it doubles..
i not have a double code.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)