SA-MP Forums Archive
[Duda]їComo hago esto? - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: Non-English (https://sampforum.blast.hk/forumdisplay.php?fid=9)
+--- Forum: Languages (https://sampforum.blast.hk/forumdisplay.php?fid=33)
+---- Forum: Español/Spanish (https://sampforum.blast.hk/forumdisplay.php?fid=29)
+---- Thread: [Duda]їComo hago esto? (/showthread.php?tid=449983)



[Duda]їComo hago esto? - matias770 - 11.07.2013

Editado: Me falto Ponerlo en la etiqueta Code

Hola, querнa preguntar como podrнa verificar si el usuario clickea el auto 411(Infernus) en el catalogo de mSelection

Acб esta el code:

Код:
public OnPlayerModelSelection(playerid, response, listid, modelid)
{
	if(listid == planelist)
	{
	    if(response)
	    {
		   	SendClientMessage(playerid, 0xFF0000FF, "Auto Conseguido");
	    	new Float:pos[3]; GetPlayerPos(playerid, pos[0], pos[1], pos[2]);
	    	CreateVehicle(modelid, pos[0] + 2.5, pos[1], pos[2] + 2.5, 0.0, random(128), random(128), -1);
	    }
	    else SendClientMessage(playerid, 0xFF0000FF, "Haz cancelado la Eleccion del coche");
	    HideModelSelectionMenu(playerid);
    	return 1;
	}
	return 1;
}
Desde ya muchas gracias.


Respuesta: [Duda]їComo hago esto? - EduGTA - 11.07.2013

Код:
public OnPlayerModelSelection(playerid, response, listid, modelid)
Algo me dice que el parбmetro "modelid" es la ID del modelo del cuadro que el jugador seleccionу.

Prueba usando un if


pawn Код:
public OnPlayerModelSelection(playerid, response, listid, modelid)
{
    if(modelid == 411)
    {
        SendClientMessage(playerid, -1, "Lindo Infernus");
    }
}



Respuesta: [Duda]їComo hago esto? - matias770 - 11.07.2013

Lo habia Probado asi, Ahora que veo le puse solo un "=" Lol xD