Jump to content
  • 0

[REZOLVAT}Cum Creez 1 pickup la niste coordonate random?


Question

4 answers to this question

Recommended Posts

Guest PlayON
Posted

Coordonatele vin sus de tot.

new Float:Random[13][3] = // 13 linii, 3,
{
	{X,Y,Z}, //Inloc de X,Y,Z ouneti tu coordonatele dorite.
	{X,Y,Z},
	{X,Y,Z},
	{X,Y,Z},
	{X,Y,Z},
	{X,Y,Z},
	{X,Y,Z},
	{X,Y,Z},
	{X,Y,Z},
	{X,Y,Z},
	{X,Y,Z},
	{X,Y,Z},
	{X,Y,Z}
};
Asta vine intr-un timer,comanda...sti tu.
new rand = random(sizeof(Random));
CreatePickup(model,2,Random[rand][0], Random[rand][1], Random[rand][2]);

Posted

Deci am facut asa

#include <a_samp>

forward rndpik(playerid);

new Float:Random[2][3] =
{
{2433.5330,-2.5433,26.4844},
{2433.1621,2.1756,26.6921}
};
public OnPlayerCommandText(playerid, cmdtext[])
{
if (strcmp("/start", cmdtext, true, 10) == 0)
{
SetTimer("rdnpik", 1000, 0);
return 1;
}
return 0;
}
public rndpik(playerid)
{
new rand = random(sizeof(Random));
CreatePickup(1276, 2, Random[rand][0], Random[rand][1], Random[rand][2]);
return 1;
}

nico o eroare sau warning da totusi pickupurile nu apar ....

Guest PlayON
Posted

Deci am facut asa

#include <a_samp>

forward rndpik(playerid);

new Float:Random[2][3] =
{
{2433.5330,-2.5433,26.4844},
{2433.1621,2.1756,26.6921}
};
public OnPlayerCommandText(playerid, cmdtext[])
{
if (strcmp("/start", cmdtext, true, 10) == 0)
{
SetTimer("rdnpik", 1000, 0);
return 1;
}
return 0;
}
public rndpik(playerid)
{
new rand = random(sizeof(Random));
CreatePickup(1276, 2, Random[rand][0], Random[rand][1], Random[rand][2]);
return 1;
}

nico o eroare sau warning da totusi pickupurile nu apar ....

Ai gresit denumirea la public la timer.

SetTimer("rdnpik", 1000, 0);

Guest
This topic is now closed to further replies.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. For more details you can also review our Terms of Use and Privacy Policy.