OnDialogResponse
#4

Quote:
Originally Posted by fuckingcruse
Посмотреть сообщение
And Dude another error , i post it here , why to make another topic,
See this codes

Код:
#include <a_samp>
#include <zcmd>
#define DIALOG_TELES 3

new Float:RandomSpawnLS[][] =
{
	{1091.0786,-1794.4513,13.6197,17.5902},
	{1959.8345,-2181.7620,13.5469,1.2967},
	{1186.0222,-1324.5660,13.5593,267.7775},
	{1316.6267,-910.7559,38.0429,178.3317},
	{1126.6519,-2036.7144,69.8838,271.3926},
	{2426.2029,-2457.7190,13.6201,316.5363}
};
new Float:RandomSpawnLV[][] =
{
	{1723.7269,1601.9326,10.0166,253.8372},
	{2025.2045,1545.3309,10.8203,273.8063},
	{2304.7341,2426.7422,10.8203,182.1671},
	{2519.7900,1824.4259,10.8129,92.7213},
	{2233.5547,1285.6110,10.8203,91.7813},
	{1061.9387,1807.1115,10.8203,1.3443}
};
new Float:RandomSpawnSF[][] =
{
	{-1983.3813,137.4470,27.6875,88.2716},
	{-2027.1277,-93.8835,35.1641,3.7260},
	{-2724.3335,-314.1563,7.1869,49.9080},
	{-2755.9751,375.4995,4.3350,273.4851},
	{-2489.6787,1200.6038,37.1529,215.2514},
	{-1508.9319,922.6257,7.1875,91.1702},
	{-1555.0504,-439.7008,6.0000,137.3754}

};

enum pInfo
{
	pLS,
	pLV,
	pSF

}
new pData[MAX_PLAYERS][pInfo];
#if defined FILTERSCRIPT

public OnFilterScriptInit()
{
	print("\n--------------------------------------");
	print(" Blank Filterscript by your name here");
	print("--------------------------------------\n");
	return 1;
}

public OnFilterScriptExit()
{
	return 1;
}

#else

main()
{
	print("\n----------------------------------");
	print(" Blank Gamemode by your name here");
	print("----------------------------------\n");
}

#endif



public OnPlayerConnect(playerid)
{
	return 1;
}

public OnPlayerDisconnect(playerid, reason)
{
	return 1;
}



public OnPlayerDeath(playerid, killerid, reason)
{
	return 1;
}

public OnVehicleSpawn(vehicleid)
{
	return 1;
}

public OnVehicleDeath(vehicleid, killerid)
{
	return 1;
}

public OnPlayerText(playerid, text[])
{
	return 1;
}

CMD:Tele(playerid,params[])
{
	ShowPlayerDialog(playerid,DIALOG_TELES,DIALOG_STYLE_LIST,"TELES","LS\nLV\nSF","Select","Close");
	return 1;
}

public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
	if(dialogid == DIALOG_TELES)
	{
	    if(response)
	    {
	        switch(listitem)
	        {
	            case 0:
	                {
	                    new Random = random(sizeof(RandomSpawnLS));
						SetPlayerPos(playerid, RandomSpawnLS[Random][0], RandomSpawnLS[Random][1], RandomSpawnLS[Random][2]);
						SetPlayerFacingAngle(playerid, RandomSpawnLS[Random][3]);
						pData[playerid][pLS] = 1;
	                }
				 case 1:
					{
	                    new Random = random(sizeof(RandomSpawnLV));
						SetPlayerPos(playerid, RandomSpawnLV[Random][0], RandomSpawnLV[Random][1], RandomSpawnLV[Random][2]);
						SetPlayerFacingAngle(playerid, RandomSpawnLV[Random][3]);
						pData[playerid][pLV] = 1;
					}
				 case 2:
					{
	                    new Random = random(sizeof(RandomSpawnSF));
						SetPlayerPos(playerid, RandomSpawnSF[Random][0], RandomSpawnSF[Random][1], RandomSpawnSF[Random][2]);
						SetPlayerFacingAngle(playerid, RandomSpawnSF[Random][3]);
						pData[playerid][pSF] = 1;
					}
	        }

	    }

	}
	return 1;
}


public OnPlayerSpawn(playerid)
{
	if(pData[playerid][pLS])
	return
	new Random = random(sizeof(RandomSpawnLS));
	SetPlayerPos(playerid, RandomSpawnLS[Random][0], RandomSpawnLS[Random][1], RandomSpawnLS[Random][2]);

	return 1;
}
It shows error , I just want to save that variable to the pInfo and it's done , can you say what's wrong ? you can understand i am doing by the codes , how to clear the error?
Cant you just help and show us where is the error and what is it ?
Reply


Messages In This Thread
OnDialogResponse - by fuckingcruse - 26.03.2015, 08:03
Re: [HELP]OnDialogResponse - by CalvinC - 26.03.2015, 08:33
Re: [HELP]OnDialogResponse - by fuckingcruse - 26.03.2015, 08:44
Re: [HELP]OnDialogResponse - by Ahmad45123 - 26.03.2015, 08:55
Re: [HELP]OnDialogResponse - by fuckingcruse - 26.03.2015, 09:06
Re: [HELP]OnDialogResponse - by CalvinC - 26.03.2015, 09:24
Re: [HELP]OnDialogResponse - by Ahmad45123 - 26.03.2015, 09:32
Re: [HELP]OnDialogResponse - by fuckingcruse - 26.03.2015, 09:34
Re: [HELP]OnDialogResponse - by fuckingcruse - 26.03.2015, 09:43

Forum Jump:


Users browsing this thread: 1 Guest(s)