SA-MP Forums Archive
some help with the login system - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: some help with the login system (/showthread.php?tid=593917)



some help with the login system - ahmedraed - 11.11.2015

Quote:

ShowPlayerDialog(playerid, DIALOG_LOGIN, DIALOG_STYLE_INPUT,""COL_WHITE"Login",""COL_WHITE" Type your password to login.","Login","Quit");

C:\Users\Ahmed\Desktop\samp037_svr_R2-1-1_win32\gamemodes\C5School.pwn(146) : error 001: expected token: "-string end-", but found "-identifier-"
C:\Users\Ahmed\Desktop\samp037_svr_R2-1-1_win32\gamemodes\C5School.pwn(146) : error 017: undefined symbol "COL_WHITE"
C:\Users\Ahmed\Desktop\samp037_svr_R2-1-1_win32\gamemodes\C5School.pwn(146) : warning 215: expression has no effect
C:\Users\Ahmed\Desktop\samp037_svr_R2-1-1_win32\gamemodes\C5School.pwn(146) : error 001: expected token: "-string end-", but found "-identifier-"
C:\Users\Ahmed\Desktop\samp037_svr_R2-1-1_win32\gamemodes\C5School.pwn(146) : fatal error 107: too many error messages on one line

Compilation aborted.Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase


4 Errors.


Re: some help with the login system - ATGOggy - 11.11.2015

Are you sure that this is the line and this code is same as the code in your script? Do you have #define COL_WHITE in your script?


Re: some help with the login system - ahmedraed - 11.11.2015

the define white is a normal error i've defined it now w/e

Quote:

C:\Users\Ahmed\Desktop\samp037_svr_R2-1-1_win32\gamemodes\C5School.pwn(146) : error 001: expected token: "-string end-", but found "-identifier-"
C:\Users\Ahmed\Desktop\samp037_svr_R2-1-1_win32\gamemodes\C5School.pwn(146) : warning 215: expression has no effect
C:\Users\Ahmed\Desktop\samp037_svr_R2-1-1_win32\gamemodes\C5School.pwn(146) : error 001: expected token: ";", but found "-string-"
C:\Users\Ahmed\Desktop\samp037_svr_R2-1-1_win32\gamemodes\C5School.pwn(146) : warning 215: expression has no effect
C:\Users\Ahmed\Desktop\samp037_svr_R2-1-1_win32\gamemodes\C5School.pwn(146) : error 001: expected token: "-string end-", but found "-identifier-"
C:\Users\Ahmed\Desktop\samp037_svr_R2-1-1_win32\gamemodes\C5School.pwn(146) : fatal error 107: too many error messages on one line

Compilation aborted.Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase


4 Errors.

this is the whole code :
http://pastebin.com/ZAPhN0CS


Re: some help with the login system - jlalt - 11.11.2015

instead ""COL_WHITE" use this thing as white colour {FFFFFF}
PHP код:
ShowPlayerDialog(playeridDIALOG_LOGINDIALOG_STYLE_INPUT,"{FFFFFF}Login","{FFFFFF}Type your password to login.","Login","Quit"); 



Re: some help with the login system - ahmedraed - 11.11.2015

i've done this already but i still get this
Quote:

C:\Users\Ahmed\Desktop\samp037_svr_R2-1-1_win32\gamemodes\C5School.pwn(146) : error 001: expected token: "-string end-", but found "-identifier-"
C:\Users\Ahmed\Desktop\samp037_svr_R2-1-1_win32\gamemodes\C5School.pwn(146) : warning 215: expression has no effect
C:\Users\Ahmed\Desktop\samp037_svr_R2-1-1_win32\gamemodes\C5School.pwn(146) : error 001: expected token: ";", but found "-string-"
C:\Users\Ahmed\Desktop\samp037_svr_R2-1-1_win32\gamemodes\C5School.pwn(146) : warning 215: expression has no effect
C:\Users\Ahmed\Desktop\samp037_svr_R2-1-1_win32\gamemodes\C5School.pwn(146) : error 001: expected token: "-string end-", but found "-identifier-"
C:\Users\Ahmed\Desktop\samp037_svr_R2-1-1_win32\gamemodes\C5School.pwn(146) : fatal error 107: too many error messages on one line

Compilation aborted.Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase


4 Errors.

this is the code :
http://pastebin.com/ZAPhN0CS


Re: some help with the login system - iKarim - 11.11.2015

PHP код:
// above in defines
#define     ClearChat(%0)     for (new i = 0; i < 40; i++) SendClientMessage(%0, -1, " ")

public OnPlayerConnect(playerid)
{
    
ClearChat(playerid);
    new 
string[SOS];
    
GetPlayerName(playeridpInfo[playerid][Nick], 20);
    
GetPlayerIp(playeridpInfo[playerid][Ip], 16);
    
format(stringSOS"*** %s has joined the server."pInfo[playerid][Nick]);
    
SendClientMessageToAll(ORANGEstring);
    if(
fexist(UserPath(playerid)))
    {
        
INI_ParseFile(UserPath(playerid), "LoadUser_%s", .bExtra true, .extra playerid);
        
ShowPlayerDialog(playeridDIALOG_LOGINDIALOG_STYLE_INPUT,"{FFFFFF}Login","{FFFFFF}Type your password to login.","Login","Quit");
    }
    else
    {
        
ShowPlayerDialog(playeridDIALOG_REGISTERDIALOG_STYLE_INPUT,"{FFFFFF}Registering...","{FFFFFF}Type your password  to register","Register","Quit");
    }
    return 
1;

This should work, and you don't have to type 'sendclientmessage' 20times to clear the chat, just use a macro.