Destination on textdraw
#1

I've made a job drugs dealer and i put 4 destinations. I made a command /work and when the player type this it spawn a vehicle and it gonna put a random destination and i want to put the name of the destination on a textdraw but how can i do it because is gonna be a random destination

Код:
new Float:CursaRandomDrug[][5] =
{
    {-2750.2234,-340.5482,7.1875,5.0},
    {-1205.6407,-100.2534,14.1440,5.0},
    {-2681.4326,1454.8734,7.1016,5.0},
    {-2070.1895,967.3536,61.3610,5.0}
};
Код:
CMD:work(playerid, params[])
{
	new rand = random(sizeof(CursaRandomDrug));
    if(IsPlayerInRangeOfPoint(playerid,7.0,-2546.0862,9.2330,16.4219))
   	{
		if(PlayerInfo[playerid][pJob] >= 1)
	    {
			if(drugdj[playerid] == 1) return SendClientMessage(playerid,COLOR_WHITE,"{FFB870}Wait 3 minutes to start another race!");
			{
				new Float:x, Float:y, Float:z, Float:a;
				GetPlayerPos(playerid, x,y,z); 
				GetPlayerFacingAngle(playerid, a);
				new vehicleid = CreateVehicle(459, x+3,y,z, a, -1, -1, -1);
				SetPlayerCheckpoint(playerid, CursaRandomDrug[rand][0], CursaRandomDrug[rand][1], CursaRandomDrug[rand][2], CursaRandomDrug[rand][3]);
				PutPlayerInVehicle(playerid, vehicleid, 0);
				drugdj[playerid] = 1;
			}
		}
	}
	return 1;
}
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)