Errors.....
#5

pawn Код:
public OnPlayerConnect(playerid)
{
    SetPlayerMapIcon( playerid, 12, -2462.4688,132.2999,35.1719, 52, 0, MAPICON_LOCAL );
    IsAfk[playerid] = 0; // When the player joins, he is not afk , OF COURSE!
    new string[64];
    new Name[MAX_PLAYER_NAME];
    GetPlayerName(playerid,Name,MAX_PLAYER_NAME);
    format(string,sizeof string,"[{00FF00}JOIN{EEEEEE}]%s has joined the server.",Name);
    SendClientMessageToAll(COLOR_WHITE,string);
    SendDeathMessage(-1, playerid, 200);
    ResetVars(playerid);
    new Query[300], rows, fields, string1[128];
    mysql_format(dbHandle,Query, sizeof(Query), "SELECT * FROM `PlayerData` WHERE `Username` = '%e'",Name(playerid));
    mysql_query(dbHandle,Query);
    cache_get_data(rows, fields);
    if(rows)
    {
        format(string1,sizeof(string1),"{EEEEEE}Welcome back %s\n{EEEEEE}Please login to continue playing",Name(playerid));
        ShowPlayerDialog(playerid, DIALOG_LOGIN, DIALOG_STYLE_PASSWORD,"Login",string1,"Login","Quit");
    }
    else if(!rows)
    {
        format(string1,sizeof(string1),"{EEEEEE}Welcome %s\n{EEEEEE}Please enter a password to register your account",Name(playerid));
        ShowPlayerDialog(playerid, DIALOG_REGISTER, DIALOG_STYLE_PASSWORD,"Register",string1,"Register","Quit");
    }
    return 1;
}
Here's the full onplayerconnect
Reply


Messages In This Thread
Errors..... - by Johnson_Brooks - 26.05.2014, 19:40
Re: Errors..... - by WardenCS - 26.05.2014, 19:53
Re: Errors..... - by Ghazal - 26.05.2014, 20:06
Re: Errors..... - by Konstantinos - 26.05.2014, 20:09
Re: Errors..... - by Johnson_Brooks - 26.05.2014, 20:10
Re: Errors..... - by Konstantinos - 26.05.2014, 20:11
Re: Errors..... - by Johnson_Brooks - 26.05.2014, 20:15
Re: Errors..... - by Konstantinos - 26.05.2014, 20:21
Re: Errors..... - by Johnson_Brooks - 26.05.2014, 20:31
Re: Errors..... - by Johnson_Brooks - 26.05.2014, 20:42

Forum Jump:


Users browsing this thread: 1 Guest(s)