Jump to content
  • 0

pomoc Zapeklitý problém - nejde GPS(v dialogu)


-FK-hofmiktom

Dotaz

Zdravím, předem říkám že script není můj je z nějakého TuTu takže mám příkaz v OnPlayerCommandText:

if (strcmp("/gps", cmdtext, true, 10) == 0)
	{
        ShowPlayerDialog(playerid,67,DIALOG_STYLE_LIST,"GPS","LV\nMAFIA\nZrušit GPS","Rozumím","Konec");
	    return 1;
	}

a jak jste si mohly všimnout tak dialogid je 67 tak a teď OnDialogResponse:

public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
	if(dialogid == 67)//Id dialogu ktoré sa  otvori
	{
	if(response == 1) //Tlačidlo 1 (Ľavé tlačidlo)
		{
	if(listitem == 0) //Prvá položka v dialógu
	{
	SCM(playerid,0xFFFFFFC8,"LV");
	SetPlayerCheckpoint(playerid,2117.2625,1431.6418,10.8203, 3.0); // Namiesto X , Y , Z si nastavime suradnice
	}
		}
	else if(listitem == 1)
		{
	SCM(playerid,0xFFFFFFC8,"MAFIA");
	SetPlayerCheckpoint(playerid,2166.2090,1710.7441,11.0469, 3.0); // Namiesto X , Y , Z si nastavime suradnice
		}
	else if(listitem == 2)
	{
	SCM(playerid,0xFFFFFFC8,"Vypnul jsi svojí GPS.");
	DisablePlayerCheckpoint(playerid); //vymaže chekpoint
		}
	}
return 0;
}

Žádné errory mi to nehází.. jen na serveru napíšu /gps tak se vůbec nic nestane.. tak prosím opravíte mi to? ? :)

Link to comment
Share on other sites

2 odpovědí na tuto otázku

Recommended Posts

  • 0


if (strcmp("/gps", cmdtext, true, 10) == 0)
{
ShowPlayerDialog(playerid,67,DIALOG_STYLE_LIST,"GPS","LV\nMAFIA\nZrušit GPS","Rozumím","Konec");
return 1;
}


public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])

{
if(dialogid == 67)//Id dialogu ktoré sa otvori
{
if(response == 1) //Tlačidlo 1 (Ľavé tlačidlo)
{
if(listitem == 0) //Prvá položka v dialógu
{
SCM(playerid,0xFFFFFFC8,"LV");
SetPlayerCheckpoint(playerid,2117.2625,1431.6418,10.8203, 3.0); // Namiesto X , Y , Z si nastavime suradnice
}
if(listitem == 1)
{
SCM(playerid,0xFFFFFFC8,"MAFIA");
SetPlayerCheckpoint(playerid,2166.2090,1710.7441,11.0469, 3.0); // Namiesto X , Y , Z si nastavime suradnice
}
if(listitem == 2)
{
SCM(playerid,0xFFFFFFC8,"Vypnul jsi svojí GPS.");
DisablePlayerCheckpoint(playerid); //vymaže chekpoint
}
}
}
return 1;
}
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...