Dialog classas help.
#1

#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 .
Reply
#2

Then goto OnDialogResponse and make if(response blabla, and give them different Weapons.
Reply
#3

Try putting on
pawn Код:
Public OnDialogResponse
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
Reply
#4

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.
Reply
#5

GivePlayerWeapon(playerid,weaponid,weaponammo);
Reply
#6

Код:
GivePlayerWeapon(playerid,weaponid,ammo);
example: 
case 1: //class 2
{
      GivePlayerWeapon(playerid,34,200); // Sniper rifle with 200 ammo
}
Reply
#7

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
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)