RRace... - 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: RRace... (
/showthread.php?tid=285371)
RRace... -
Edvin - 23.09.2011
Hi, how i cand make a dialog to show all avabile races...i use RRace system...
i have somethink like this:
pawn Код:
CMD:realraces( PARAMS )
{
new str[ 128 ], str2[ 1024 ];
LoadRaceNames( );
format( str2, sizeof( str2 ), "{FFFFFF}" );
Loop( x, TotalRaces )
{
format( str, 128, "%s\n", RaceNames[ x ] );
strcat( str2, str, 1024 );
}
ShowPlayerDialog( playerid, CURSE_REALE, DIALOG_STYLE_LIST, "{FFFFFF}Avabile Races:", str, "Join", "Cancel" );
return 1;
}
But it shows me just LV Race...
And a secound question is...:
How i can make a dialog response for that dialog?
Re: RRace... -
IstuntmanI - 23.09.2011
Change
Код:
ShowPlayerDialog( playerid, CURSE_REALE, DIALOG_STYLE_LIST, "{FFFFFF}Avabile Races:", str, "Join", "Cancel" );
to
Код:
ShowPlayerDialog( playerid, CURSE_REALE, DIALOG_STYLE_LIST, "{FFFFFF}Avabile Races:", str2, "Join", "Cancel" );
EDIT: And a response with what ? Use listitem ... Race[ listitem ][ Started ] ... something like this.
Re: RRace... -
Edvin - 23.09.2011
Yeah thats work that you say there but on OnDialogResponse i type This:
pawn Код:
if ( dialogid == CURSE_REALE && response )
{
LoadRace( playerid, listitem );
}
and it give me this error:
[pawn]
C:\Documents and Settings\user\My Documents\RAS&MAP&FS&SERVERS\RAS\gamemodes\RAS.pwn (7962) : error 035: argument type mismatch (argument 2)