Dialog classas help. - 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: Dialog classas help. (
/showthread.php?tid=427601)
Dialog classas help. -
Branzy - 02.04.2013
#define DIALOG_CLASS 4
if(gTeam[playerid] == DUELERS) {
SetPlayerColor(playerid, COLOR_BLUE);
SetPlayerTeam(playerid,DUELERS);
GameTextForPlayer(playerid,"Welcome to DUELERS",6000,5);
ShowPlayerDialog(playerid, DIALOG_CLASS, DIALOG_STYLE_LIST, "Choose your class", "Soldier\nSniper\nEngineer\nScout\nPilot.", "Ok", "Cancel");
return 1;
I wana do that when people choose 1 of these classes Soldier\Sniper\Engineer\Scout\Pilot they will have different weapons .
AW: Dialog classas help. -
Blackazur - 02.04.2013
Then goto OnDialogResponse and make if(response blabla, and give them different Weapons.
Re: Dialog classas help. -
L.Hudson - 02.04.2013
Try putting on
the following:
pawn Код:
if(dialogid == DIALOG_CLASS)
{
if(response)
{
switch(listitem)
{
case 0: // Class 1
{
//Add weapons here
}
case 1: // Class 2
{
//Add weapons here
}
}
}
}
You can continue the cases based on your classes
Re: Dialog classas help. -
Branzy - 02.04.2013
Why these eroors:
Код:
C:\DOCUME~1\cla\Desktop\SAMP\SAMP03~1\GAMEMO~1\Malta.pwn(920) : error 017: undefined symbol "Soldier"
C:\DOCUME~1\cla\Desktop\SAMP\SAMP03~1\GAMEMO~1\Malta.pwn(922) : warning 215: expression has no effect
C:\DOCUME~1\cla\Desktop\SAMP\SAMP03~1\GAMEMO~1\Malta.pwn(926) : warning 217: loose indentation
C:\DOCUME~1\cla\Desktop\SAMP\SAMP03~1\GAMEMO~1\Malta.pwn(926) : error 014: invalid statement; not in switch
C:\DOCUME~1\cla\Desktop\SAMP\SAMP03~1\GAMEMO~1\Malta.pwn(926) : warning 215: expression has no effect
C:\DOCUME~1\cla\Desktop\SAMP\SAMP03~1\GAMEMO~1\Malta.pwn(926) : error 001: expected token: ";", but found ":"
C:\DOCUME~1\cla\Desktop\SAMP\SAMP03~1\GAMEMO~1\Malta.pwn(926) : error 029: invalid expression, assumed zero
C:\DOCUME~1\cla\Desktop\SAMP\SAMP03~1\GAMEMO~1\Malta.pwn(926) : fatal error 107: too many error messages on one line
Compilation aborted.Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase
5 Errors.
AW: Dialog classas help. -
Blackazur - 02.04.2013
GivePlayerWeapon(playerid,weaponid,weaponammo);
AW: Dialog classas help. -
[AK]Nazgul - 02.04.2013
Код:
GivePlayerWeapon(playerid,weaponid,ammo);
example:
case 1: //class 2
{
GivePlayerWeapon(playerid,34,200); // Sniper rifle with 200 ammo
}
Re: Dialog classas help. -
Branzy - 02.04.2013
Sry for changing it Please check my last post again .
I fixed it .
But got this Error:
Код:
C:\DOCUME~1\cla\Desktop\SAMP\SAMP03~1\GAMEMO~1\Malta.pwn(959) : error 030: compound statement not closed at the end of file (started at line 923)
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase
1 Error.
Please Reply