Jump to content
  • 0

pomoc OnDialogResponse [Case]


N8t8nCZ

Dotaz

7 odpovědí na tuto otázku

Recommended Posts

  • 0

No tak např já to mám takto :)

// This is a comment
// uncomment the line below if you want to write a filterscript
//#define FILTERSCRIPT

#include <a_samp>
#define COLOR_RED 0xFF0000FF //Barva ! 

public OnPlayerCommandText(playerid, cmdtext[])
{
    if(!strcmp(cmdtext, "/prikaz", true))
    {
                if(!IsPlayerInAnyVehicle(playerid)) return SendClientMessage(playerid,COLOR_RED,"[!]{0000FF}Nejsi ve vozidle !");//Toto si smaz jesli chces 
		ShowPlayerDialog(playerid,100,DIALOG_STYLE_LIST,"Nazev Dialogu","{00FFFF}NECO 1\n{00FFFF}NECO\n{00FFFF}NECO\nNECO","OK","Konec");
		return 1;
	}
	return 0;
}
//==DIALOOGY ! ..
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
        if(dialogid == 100)
        {
                if(response)
                {
                        if(listitem == 0)//Toto je TO neco 1 
                        {

        		RepairVehicle(GetPlayerVehicleID(playerid));
        		SendClientMessage(playerid,COLOR_RED,"[AutoMechanik]{0000FF}Opravil sis auto !");
        		        }
        		        if(listitem == 1) // To druhe neco
						{
		        AddVehicleComponent(GetPlayerVehicleID(playerid), 1010);//Funkce
		        SendClientMessage(playerid,COLOR_RED,"ZPRAVA");
		        		}
        		        if(listitem == 2) // 3 Neco 
				  		{
                AddVehicleComponent(GetPlayerVehicleID(playerid), 1087);//FUNKCE
                SendClientMessage(playerid,COLOR_RED,"Zprava");
      					}
        		        if(listitem == 3) // 4 Neco  To asi chapes  ?
				  		{
                ShowPlayerDialog(playerid,101,DIALOG_STYLE_MSGBOX,"Ja tu mel Credits","TEST","OK","Konec"); 
            			}
                }
        }
    	return 0;
}

No uprav si to snad to chpaes na vysvetlovani nejsem :d

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...