Help -
Trucker[UK] - 24.09.2011
Hello
Can anyone tell me if i have done something wrong here
Код:
// This command displays the rules of the server
COMMAND:rules(playerid, params[])
{
// Setup local variables
new Msg[2000];
// Send the command to all admins so they can see it
SendAdminText(playerid, "/rules", params);
// Check if the player has logged in
if (APlayerData[playerid][LoggedIn] == true)
{
format(Msg, 2000, "%s1. No fighting, no killing, no ramming or carjacking!\n", Msg);
format(Msg, 2000, "%s2. Teleport, weapons,airbreak,speedhack and other cheats are not allowed.\n",Msg);
format(Msg, 2000, "%s3. No flooding or spamming of chat, no advertising.\n", Msg);
format(Msg, 2000, "%s4. No glitching or lagging mods.\n", Msg);
format(Msg, 2000, "%s5. Main chat only english.\n", Msg);
format(Msg, 2000, "%s6. Respect other players. Abusive lanuage is not allowed.\n", Msg);
format(Msg, 2000, "%s7. Glitching/ bugged vehicles modifications are not allowed.\n", Msg);
format(Msg, 2000, "%s8. Do not ask for money/ house/ cars or score earn everything by yourself.\n",Msg);
format(Msg, 2000, "%s9. Do not PM admins for no good reason. Use forum instead.\n", Msg);
format(Msg, 2000, "%s10. Any bugs should be reported to admins or in forum. Don't exploit bugs!\n",Msg);
format(Msg, 2000, "Vist www.uktrucking.co.nr for more explicit rules, driving rules etc.\n", Msg);
format(Msg, 2000, "Anyone breaking the rules will be banned.\n", Msg);
// Show a dialog that shows the rules
ShowPlayerDialog(playerid, DialogRules, DIALOG_STYLE_MSGBOX, "Rules of the server:", Msg, "Accept", TXT_DialogButtonCancel);
}
else
return 0;
// Let the server know that this was a valid command
return 1;
}
Picture when i type /rules
Thanks
Re: Help - array13 - 24.09.2011
i think the bug is on the currnetly not on duty xD
Try to make a dialog,will be better
like ShowPlayerDialog(playerid, DialogRules, DIALOG_STYLE_MSGBOX, "Rules of the server:", "No killing\n\...., "Accept", TXT_DialogButtonCancel);
Re: Help -
Trucker[UK] - 24.09.2011
no it is just the dialog part in middle of screen but at the top it shows the rules i have added but when i go into game and type /rules it only comes up with that one
AW: Help -
Nero_3D - 24.09.2011
You missed at the last two formats the %s at the beginning
Also I recommand to use strcat for that because you only concatenate strings
Re: Help -
aRoach - 24.09.2011
No, just do this:
pawn Код:
// This command displays the rules of the serverCMD:rules
( playerid
){ // Setup local variables new Msg
[ 5000 ];
// Send the command to all admins so they can see it SendAdminText
(playerid,
"/rules", params
);
// Check if the player has logged in if (APlayerData
[playerid
][LoggedIn
] == true
) { strcat( Msg,
"1. No fighting, no killing, no ramming or carjacking!\n" );
strcat( Msg,
"2. Teleport, weapons,airbreak,speedhack and other cheats are not allowed.\n" );
strcat( Msg,
"3. No flooding or spamming of chat, no advertising.\n" );
strcat( Msg,
"4. No glitching or lagging mods.\n" );
strcat( Msg,
"5. Main chat only english.\n" );
strcat( Msg,
"6. Respect other players. Abusive lanuage is not allowed.\n" );
strcat( Msg,
"7. Glitching/ bugged vehicles modifications are not allowed.\n" );
strcat( Msg,
"8. Do not ask for money/ house/ cars or score earn everything by yourself.\n" );
strcat( Msg,
"9. Do not PM admins for no good reason. Use forum instead.\n" );
strcat( Msg,
"10. Any bugs should be reported to admins or in forum. Don't exploit bugs!\n" );
strcat( Msg,
"Vist http://www.uktrucking.co.nr for more explicit rules, driving rules etc.\n" );
strcat( Msg,
"Anyone breaking the rules will be banned.\n" );
// Show a dialog that shows the rules ShowPlayerDialog
(playerid, DialogRules, DIALOG_STYLE_MSGBOX,
"Rules of the server:", Msg,
"Accept", TXT_DialogButtonCancel
);
} else return 0;
// Let the server know that this was a valid command return 1;
}
Re: Help -
Trucker[UK] - 24.09.2011
how do i change the dialog box to this one
and how would a change the font size as it is too small
Thanks
Re: Help -
aRoach - 24.09.2011
Change
DIALOG_STYLE_MSGBOX to
DIALOG_STYLE_LIST.
For the Font Size you can change your Game Resolution, there isn't another thing to change the Font Size...
Re: Help -
Trucker[UK] - 24.09.2011
i want to change the size of the text when they see the dialog
Re: Help -
Trucker[UK] - 24.09.2011
when i compile my game mode after editing it i get these warnings and errors
Код:
C:\Program Files (x86)\Rockstar Games\GTA San Andreas\SAMP\Samp\pawno\include\PPC_PlayerCommands.inc(2849) : warning 217: loose indentation
C:\Program Files (x86)\Rockstar Games\GTA San Andreas\SAMP\Samp\pawno\include\PPC_PlayerCommands.inc(4264) : warning 217: loose indentation
C:\Program Files (x86)\Rockstar Games\GTA San Andreas\SAMP\Samp\pawno\include\PPC_PlayerCommands.inc(4264) : error 029: invalid expression, assumed zero
C:\Program Files (x86)\Rockstar Games\GTA San Andreas\SAMP\Samp\pawno\include\PPC_PlayerCommands.inc(4264) : error 017: undefined symbol "params"
C:\Program Files (x86)\Rockstar Games\GTA San Andreas\SAMP\Samp\pawno\include\PPC_PlayerCommands.inc(4264) : error 029: invalid expression, assumed zero
C:\Program Files (x86)\Rockstar Games\GTA San Andreas\SAMP\Samp\pawno\include\PPC_PlayerCommands.inc(4264) : fatal error 107: too many error messages on one line
this is line 4264
2849
Re: Help -
Trucker[UK] - 24.09.2011
I now get these errors
Код:
C:\Program Files\Rockstar Games\GTA San Andreas\SAMP\Samp\pawno\include\PPC_PlayerCommands.inc(2565) : warning 217: loose indentation
C:\Program Files\Rockstar Games\GTA San Andreas\SAMP\Samp\pawno\include\PPC_PlayerCommands.inc(2570) : warning 217: loose indentation
C:\Program Files\Rockstar Games\GTA San Andreas\SAMP\Samp\pawno\include\PPC_PlayerCommands.inc(2570) : error 029: invalid expression, assumed zero
C:\Program Files\Rockstar Games\GTA San Andreas\SAMP\Samp\pawno\include\PPC_PlayerCommands.inc(2570 -- 2571) : warning 215: expression has no effect
C:\Program Files\Rockstar Games\GTA San Andreas\SAMP\Samp\pawno\include\PPC_PlayerCommands.inc(2571) : error 001: expected token: ";", but found "return"
C:\Program Files\Rockstar Games\GTA San Andreas\SAMP\Samp\pawno\include\PPC_PlayerCommands.inc(2571) : warning 217: loose indentation
C:\Program Files\Rockstar Games\GTA San Andreas\SAMP\Samp\pawno\include\PPC_PlayerCommands.inc(2574) : warning 225: unreachable code
C:\Program Files\Rockstar Games\GTA San Andreas\SAMP\Samp\pawno\include\PPC_PlayerCommands.inc(2574) : warning 217: loose indentation
C:\Program Files\Rockstar Games\GTA San Andreas\SAMP\Samp\pawno\include\PPC_PlayerCommands.inc(2578) : warning 217: loose indentation
C:\Program Files\Rockstar Games\GTA San Andreas\SAMP\Samp\pawno\include\PPC_PlayerCommands.inc(2578) : error 029: invalid expression, assumed zero
C:\Program Files\Rockstar Games\GTA San Andreas\SAMP\Samp\pawno\include\PPC_PlayerCommands.inc(2578) : error 017: undefined symbol "cmd_cmds"
C:\Program Files\Rockstar Games\GTA San Andreas\SAMP\Samp\pawno\include\PPC_PlayerCommands.inc(2578) : error 029: invalid expression, assumed zero
C:\Program Files\Rockstar Games\GTA San Andreas\SAMP\Samp\pawno\include\PPC_PlayerCommands.inc(2578) : fatal error 107: too many error messages on one line
Line 2565
Код:
if (strlen(AdminList) > 0)
Line 2570
Line 2571
Line 2574
Line 2578
Код:
COMMAND:cmds(playerid, params[])