SA-MP Forums Archive
dialog 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 help (/showthread.php?tid=292647)



dialog help - manchestera - 24.10.2011

Ok what do i put "//here" to make the dialog preform the action i looked on wiki but it didnt understand just that line.

Код:
{
    if(dialogid == 1001)
    {
        if(!response) return SendClientMessage(playerid, 0xFFFFFFFF, "You canceled!");//here
    PutPlayerInVehicle(playerid, cvehicle, 0);
	SetVehiclePos(cvehicle, 1020.7713, -920.2669, 419.8624);
	SetPlayerCheckpoint(playerid, 248.4739, -1329.2743, 52.6960, 5); // This will change the variable, so we can use it later on with OnPlayerEnterCheckpoint
	Challange1 = CreateDynamicCP( 248.4739, -1329.2743, 52.6960, 5);
    SendClientMessage(playerid, 0xFFFFFFFF, "You Started The Big Jump 1 Challange Get To The Checkpoint Quick");
        return 1;
    }
It need to repsoned to this "Start"

Код:
{
    if(pickupid == Challange1p) ShowPlayerDialog(playerid,1001,DIALOG_STYLE_MSGBOX,"Big Jump One","Do You Think You Have /nWhat It Takes To Beat This Challange?","Start","");//here
	}
Many thanks.


Re: dialog help - LetsOWN[PL] - 24.10.2011

Quote:

dialog preform the action

What do you want to dialog perform? What action?


Re: dialog help - manchestera - 24.10.2011

What i mean is how do i make my dialog respone to a player pressing "start" in the dialog?

The 1st part my be total wrong as i just delet the stuff from https://sampwiki.blast.hk/wiki/OnDialogResponse and put in my info.


Re: dialog help - LetsOWN[PL] - 24.10.2011

Quote:

What i mean is how do i make my dialog respone to a player pressing "start" in the dialog?

Assuming to that, I think, that You've to do write code in public OnPlayerDialogResponse. In fisrt post you wrote the code.
I've modded it a bit
pawn Код:
if(dialogid == 1001 && response) {
     if(response){
// What will be done, when player pressed 'Start'
        PutPlayerInVehicle(playerid, cvehicle, 0);
    SetVehiclePos(cvehicle, 1020.7713, -920.2669, 419.8624);
    SetPlayerCheckpoint(playerid, 248.4739, -1329.2743, 52.6960, 5); // This will change the variable, so we can use it later on with OnPlayerEnterCheckpoint
    Challange1 = CreateDynamicCP( 248.4739, -1329.2743, 52.6960, 5);
    SendClientMessage(playerid, 0xFFFFFFFF, "You Started The Big Jump 1 Challange Get To The Checkpoint Quick");
}
else
{
//When aint responsed, e.g clicked ESC
return 1;
}
        return 1;
}
I don't know, if thats works, I even aint wrote it in pawn, only here, in msgbox.
Hope it will works.

LetsOWN



Re: dialog help - Yahav - 24.10.2011

This guide from Israel, a good guide I learned from him, is in Hebrew but I brought you a link to English via ****** trabslate

here


Re: dialog help - manchestera - 24.10.2011

Think i totally failed i was trying to make this cmd into a dialog that show up when u pickup a pickup.

Код:
COMMAND:challange1(playerid, params[])
{
    if( IsPlayerInRangeOfPoint( playerid, 3.0, 1017.3148, -929.1449, 420.1316 ) ) // change the '1, 2, 3' to the coords for bigjump 1 (example)
    PutPlayerInVehicle(playerid, cvehicle, 0);
	SetVehiclePos(cvehicle, 1020.7713, -920.2669, 419.8624);
	SetPlayerCheckpoint(playerid, 248.4739, -1329.2743, 52.6960, 5); // This will change the variable, so we can use it later on with OnPlayerEnterCheckpoint
	Challange1 = CreateDynamicCP( 248.4739, -1329.2743, 52.6960, 5);
    SendClientMessage(playerid, 0xFFFFFFFF, "You Started The Big Jump 1 Challange Get To The Checkpoint Quick");
    return 1;
}
Could anyone how me what i need to do this?


Re: dialog help - Yahav - 24.10.2011

Use the guide I gave you


Re: dialog help - manchestera - 24.10.2011

It doesnt help as it doesnt have a guide for just pressing the buttons it only has how to create it notthe response for it.


Re: dialog help - Yahav - 24.10.2011

No you're wrong, yes there is the response, but you can do the first part without a response and it will work for you


Re: dialog help - manchestera - 24.10.2011

SO ive got this how do i make it respone to "start" and do all the things i listed

Код:
if(dialogid == 1)
    {
    PutPlayerInVehicle(playerid, cvehicle, 0);
	SetVehiclePos(cvehicle, 1020.7713, -920.2669, 419.8624);
	SetPlayerCheckpoint(playerid, 248.4739, -1329.2743, 52.6960, 5); // This will change the variable, so we can use it later on with OnPlayerEnterCheckpoint
	Challange1 = CreateDynamicCP( 248.4739, -1329.2743, 52.6960, 5);
    SendClientMessage(playerid, 0xFFFFFFFF, "You Started The Big Jump 1 Challange Get To The Checkpoint Quick");
    return 1;
}
Sorry about this but ive just got myself realy confused -.-