[Help] OnPlayerConnect public.
#1

PHP код:
public OnPlayerConnect(playerid)
{
    
TextDrawShowForPlayer(playeridTextdrawConnect0); // Connect Textdraw
    
TextDrawShowForPlayer(playeridTextdrawConnect1); // Connect Textdraw
    
TextDrawShowForPlayer(playeridTextdrawConnect2); // Connect Textdraw
    
TextDrawShowForPlayer(playeridTextdrawConnect3); // Connect Textdraw
    
TextDrawShowForPlayer(playeridTextdrawConnect4); // Connect Textdraw
    
TextDrawShowForPlayer(playeridTextdrawConnect5); // Connect Textdraw
    
TextDrawShowForPlayer(playeridTextdrawConnect6); // Connect Textdraw
    
TextDrawShowForPlayer(playeridTextdrawConnect7); // Connect Textdraw
    
TextDrawShowForPlayer(playeridTextdrawConnect8); // Connect Textdraw
    
TextDrawShowForPlayer(playeridTextdrawConnect9); // Connect Textdraw
    
TextDrawShowForPlayer(playeridTextdrawConnect10); // Connect Textdraw
    
TextDrawShowForPlayer(playeridTextdrawConnect11); // Connect Textdraw
    
TextDrawShowForPlayer(playeridTextdrawConnect12); // Connect Textdraw
    
TextDrawShowForPlayer(playeridTextdrawConnect13); // Connect Textdraw
    
TextDrawShowForPlayer(playeridTextdrawConnect14); // Connect Textdraw
    
TextDrawShowForPlayer(playeridTextdrawConnect15); // Connect Textdraw
    
TextDrawShowForPlayer(playeridTextdrawConnect16); // Connect Textdraw
    
TextDrawShowForPlayer(playeridTextdrawConnect17); // Connect Textdraw
    
TextDrawShowForPlayer(playeridTextdrawConnect18); // Connect Textdraw
    
TextDrawShowForPlayer(playeridTextdrawConnect19); // Connect Textdraw
    
TextDrawShowForPlayer(playeridCredit); // Credits
    
new name[MAX_PLAYER_NAME]; // Player Name Textdraw
    
GetPlayerName(playerid,name,MAX_PLAYER_NAME);// Player Name Textdraw
    
PlayerN=TextDrawCreate(115,416,name);// Player Name Textdraw
    
TextDrawShowForPlayer(playeridPlayerN);// Player Name Textdraw
    
TextDrawColor(PlayerN,0xFFFFFFAA);// Player Name Textdraw
    
TextDrawFont(PlayerN,3);// Player Name Textdraw
    
TextDrawSetShadow(PlayerN,1);// Player Name Textdraw
    
        
pLogged[playerid] = 0;
    
#if defined AUTOLOGIN
        
new tmpIP[16];
        
GetPlayerIp(playerid,tmpIP,sizeof(tmpIP)); //Getting IP
    #endif
    
if(fexist(PlayerPath(playerid)))
    {
        
INI_ParseFile(PlayerPath(playerid), "UserDataLoad_%s", .bExtra true, .extra playerid); //Calling loading callback
        #if defined AUTOLOGIN
            
if(strcmp(tmpIP,pIP[playerid],true) == 0)//Checking if the IPs match
            

                
pLogged[playerid] = 1;
                
SetPlayerScore(playerid,pInfo[playerid][Score]);
                
GivePlayerMoney(playerid,pInfo[playerid][Cash]);
                
SendClientMessage(playerid,lime,"You've been auto-logged in. [IP match]");
                return 
1;
            }
        
#endif
        
ShowPlayerDialog(playerid,DIALOG_LOGIN,DIALOG_STYLE_INPUT,"Login","Please enter your password below.","Login","Leave");
    }
     else
          {
        
ShowPlayerDialog(playerid,DIALOG_REGISTER,DIALOG_STYLE_INPUT,"Register","Please register by entering a password below.","Register","Leave");
    }
        if(
dini_Exists(MsgFile()))
        {
        new 
string[128];
        
format(string,128,"Server Message: {ffffff}%s",dini_Get(MsgFile(),"MSG"));
        
SendClientMessage(playerid,0x00ff00ff,string);
        return 
1;
        }
    
    
PlayAudioStreamForPlayer(playerid,"http://k005.kiwi6.com/hotlink/0hn592rrdn/Alex_Mica_Dalinda_Official_Radio_Edit.mp3");
      
Radio[playerid] = false;
      
     return 
1;

Few day's ago i just added the register system after i read a tutorial in the sub fourm, anyway i think there's a problem in the public that i can not see.

A. The music not playing. (WORKED before three day's)
B. The server message doesn't shown up.


Thanks!
Reply


Messages In This Thread
[Help] OnPlayerConnect public. - by Firo - 19.05.2012, 17:47
Re: [Help] OnPlayerConnect public. - by Firo - 19.05.2012, 18:00
AW: Re: [Help] OnPlayerConnect public. - by Nero_3D - 19.05.2012, 18:19
Re: AW: Re: [Help] OnPlayerConnect public. - by Firo - 19.05.2012, 20:41
Re: [Help] OnPlayerConnect public. - by [FMJ]PowerSurge - 19.05.2012, 21:09
Re: [Help] OnPlayerConnect public. - by Firo - 20.05.2012, 09:54
Re: [Help] OnPlayerConnect public. - by [FMJ]PowerSurge - 20.05.2012, 11:54
Re: [Help] OnPlayerConnect public. - by Firo - 20.05.2012, 12:32
Re: [Help] OnPlayerConnect public. - by [FMJ]PowerSurge - 20.05.2012, 12:49
Re: [Help] OnPlayerConnect public. - by Firo - 20.05.2012, 12:50

Forum Jump:


Users browsing this thread: 3 Guest(s)