SA-MP Forums Archive
Server rules dialog - 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: Server rules dialog (/showthread.php?tid=528730)



Server rules dialog - Andre02 - 29.07.2014

Hello everyone today i come with a problem which is the rules dialog

i just downloaded Dialog Creator 1.1 by Tek and Patch to make my server rules dialog and i have a problem when i compile the Gamemode:

pawn Код:
C:\Users\xxx\Desktop\Samp Script\.pwn , .amx\GM\SupremeTestWorld.pwn(577) : error 075: input line too long (after substitutions)
C:\Users\xxx\Desktop\Samp Script\.pwn , .amx\GM\SupremeTestWorld.pwn(578) : error 037: invalid string (possibly non-terminated string)
C:\Users\xxx\Desktop\Samp Script\.pwn , .amx\GM\SupremeTestWorld.pwn(578) : error 017: undefined symbol "No"
C:\Users\xxx\Desktop\Samp Script\.pwn , .amx\GM\SupremeTestWorld.pwn(578) : error 017: undefined symbol "hacking"
C:\Users\xxx\Desktop\Samp Script\.pwn , .amx\GM\SupremeTestWorld.pwn(578) : fatal error 107: too many error messages on one line

Compilation aborted.Pawn compiler 3.2.3664          Copyright (c) 1997-2006, ITB CompuPhase


5 Errors.
here's the lines where the problem is:

pawn Код:
public OnPlayerConnect(playerid)
{   // Login Message
    new pName[24];
    new str[128];
    GetPlayerName(playerid, pName, 24);
    format(str, 128, "[SERVER] %s Joined Supreme Stunt World", pName);
    SendClientMessageToAll(0xB8860BAA, str);
    // Auto Repair
    SetTimerEx("AutoRepair",500,true,"d",playerid);
    // Login and Register System
    if(fexist(UserPath(playerid)))
    {
        INI_ParseFile(UserPath(playerid), "LoadUser_%s", .bExtra = true, .extra = playerid);
        ShowPlayerDialog(playerid, DIALOG_LOGIN, DIALOG_STYLE_INPUT,""COL_WHITE"Login",""COL_WHITE"Type your password below to login.","Login","Quit");
    }
    else
    {
        ShowPlayerDialog(playerid, DIALOG_REGISTER, DIALOG_STYLE_INPUT,""COL_WHITE"Registering...",""COL_WHITE"Type your password below to register a new account.","Register","Quit");
    }
    // Rules Dialog
    ShowPlayerDialog(playerid,0,DIALOG_STYLE_MSGBOX ,"Server Rules","1- No hacking/Cheating to get advantage over other players!\n2- No Bug Abusing, c-bug, g-abuse and all other bugs are not allowed[2shot is allowed, you can also switch the weapons to reload]\n3- No Blocking, Carjacking, Drive-by etc.. ,Players wanna have fun and dont wanna be always be blocked in ramps, helikilled by someone.\n4- No Spawnkill, Players dont wanna be killed everytime they spawn.\n5- No Advertisement, do NOT send any other server IP!\6- NO Racism/Insults, Everyone is allowed to play here.Not supporting any intolerance to other races, if so, please grow up.\7- Respect Everyone, Treat other players the way that you would want to be treated.","Ok","");
    return 1;
}
but weird is that my CMD to show the rules dont have any problem :/ and it is the same code


Re: Server rules dialog - GShock - 29.07.2014

The input is too long try to shorten it.


Re : Re: Server rules dialog - Andre02 - 29.07.2014

Quote:
Originally Posted by GShock
Посмотреть сообщение
The input is too long try to shorten it.
what do you mean ? i didnt get it sorry :/


Re: Server rules dialog - Beckett - 29.07.2014

You should not show this dialog now because if the player if registering or logging in he might bypass the login dialog and get to your *Rules* one, make it show after the response of Dialog_Login/Register.


Re : Re: Server rules dialog - Andre02 - 29.07.2014

Quote:
Originally Posted by DaniceMcHarley
Посмотреть сообщение
You should not show this dialog now because if the player if registering or logging in he might bypass the login dialog and get to your *Rules* one, make it show after the response of Dialog_Login/Register.
how can i do that ? and will this solve my problem ?


Re : Server rules dialog - Andre02 - 29.07.2014

ok i already fixed everything but now i got a new problem



here's code:

pawn Код:
CMD:rules(playerid, params[])
{
    new string[1024];

    format(string, 1024, "1- No hacking/Cheating to get advantage over other players!\n2- No Bug Abusing, c-bug, g-abuse and all other bugs are not allowed[2shot is allowed, you can also switch the weapons to reload]\n3- No Blocking, Carjacking, Drive-by etc.. ,");
    format(string, 1024, "%sPlayers wanna have fun and dont wanna be always blocked in ramps, helikilled by someone.\n4- No Spawnkill, Players dont wanna be killed everytime they spawn.\n5- No Advertisement, do NOT send any other server IP!\n6- NO Racism/Insults, Everyone is allowed to play here.Not supporting any intolerance to other races, if so, please grow up.\n7- Respect Everyone, Treat other players the way that you would want to be treated.", string);
    ShowPlayerDialog(playerid,0,DIALOG_STYLE_MSGBOX ,"Server Rules",string,"Ok","");
    return 1;
}
pawn Код:
public OnPlayerConnect(playerid)
{   // Login Message
    new pName[24];
    new str[128];
    GetPlayerName(playerid, pName, 24);
    format(str, 128, "[SERVER] %s Joined Supreme Stunt World", pName);
    SendClientMessageToAll(0xB8860BAA, str);
    // Auto Repair
    SetTimerEx("AutoRepair",500,true,"d",playerid);
    // Login and Register System
    if(fexist(UserPath(playerid)))
    {
        INI_ParseFile(UserPath(playerid), "LoadUser_%s", .bExtra = true, .extra = playerid);
        ShowPlayerDialog(playerid, DIALOG_LOGIN, DIALOG_STYLE_INPUT,""COL_WHITE"Login",""COL_WHITE"Type your password below to login.","Login","Quit");
    }
    else
    {
        ShowPlayerDialog(playerid, DIALOG_REGISTER, DIALOG_STYLE_INPUT,""COL_WHITE"Registering...",""COL_WHITE"Type your password below to register a new account.","Register","Quit");
    }
    // Rules Dialog

    new string[1024];

    format(string, 1024, "1- No hacking/Cheating to get advantage over other players!\n2- No Bug Abusing, c-bug, g-abuse and all other bugs are not allowed[2shot is allowed, you can also switch the weapons to reload]\n3- No Blocking, Carjacking, Drive-by etc.. ,");
    format(string, 1024, "%sPlayers wanna have fun and dont wanna be always blocked in ramps, helikilled by someone.\n4- No Spawnkill, Players dont wanna be killed everytime they spawn.\n5- No Advertisement, do NOT send any other server IP!\n6- NO Racism/Insults, Everyone is allowed to play here.Not supporting any intolerance to other races, if so, please grow up.\n7- Respect Everyone, Treat other players the way that you would want to be treated.", string);
    ShowPlayerDialog(playerid,0,DIALOG_STYLE_MSGBOX ,"Server Rules",string,"Ok","");
    return 1;
}



Re : Server rules dialog - Andre02 - 29.07.2014

Its fixed now thank you for helping guys


Re: Server rules dialog - Beckett - 29.07.2014

Use \n To start a new line and avoid the text to go over the screen.