SA-MP Forums Archive
Dialog team help please. - 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 team help please. (/showthread.php?tid=373252)



Dialog team help please. - Magic_Time - 29.08.2012

Hi,
I have a question, I hiope you can answer it.

I made 2 teams:

Grove and Balla.

I want it, when a player connects, instead see the the same thing:
like:
PHP код:
OnPlayerRequestClass
if(classid == 0)
    {
        
gTeam[playerid] = BALLAS;
        
GameTextForPlayer(playerid,"~w~Ballas",3000,5); // This will show up an Text , when you select your class
        
SetPlayerPos(playerid,1975.2399,-1220.0157,25.0779); // position of the player in the class selection
        
SetPlayerCameraPos(playerid,1969.5686,-1224.0016,24.9909); // Cameraposition
        
SetPlayerCameraLookAt(playerid,1975.2399,-1220.0157,25.0779);
        
SetPlayerFacingAngle(playerid,122.4500);
        
SetPlayerColor(playerid,0xA000FFFF); // Teamcolor
    

They see a dialog where be all the 2 teams:

Example:

Код:
Teams:
Grove
Balla
Join, Quit.
Can Someone tell me how to do it?


Re: Dialog team help please. - ThePhenix - 29.08.2012

What do you need exactly


Re: Dialog team help please. - ZBits - 29.08.2012

what i think you cant show Dialog on Requestclass you can put it under OnPlayerSpawn

pawn Код:
public OnPlayerSpawn(playerid)
{
ShowPlayerDialog(playerid,128,DIALOG_STYLE_LIST,"Teams","Team Balla\nTeam Grove", "Select", "Cancel");
return 1;
}

public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
switch(dialogid)
{
case 128:
{
if(!response) return SendClientMessage(playerid,-1,"You Canceled");
switch(listitem)
{
case 1:
{
gTeam[playerid] == TEAM_BALLA;
SendClientMessage(playerid,-1,"Welcome to Team Balla");
}
case 2:
{
gTeam[playerid] == TEAM_GROVE;
SendClientMessage(playerid,-1,"Welcome to team Grove");
}
}
}
return 1;
}