CreateVehicle? Attach3DTextLabel
#1

Quote:

if(dialogid == 538 && response)
{
format(String, sizeof(String), ".тмйк мзлеъ тег %d гчеъ лгй мдъзйм аъ дощйод ", (userdata[playerid][pizzatimer] - gettime())/60);
if(userdata[playerid][pizzatimer] - gettime() > 0) return SendClientMessage(playerid, COLOR_KRED, String);

if(PizzaMissionStarted == 1) return SendClientMessage(playerid, COLOR_KRED, "!йщ лшвт ойщде щобцт аъвш жд, ара доъп");
if(InPizzaMission[playerid] == 1) return SendClientMessage(playerid, COLOR_KRED, "!аъд лбш роца бощйод жаъ");
if(!CPS_IsPlayerInCheckpoint(playerid, CP_StartPizzaMission))return SendClientMessage(playerid, COLOR_KRED, "! аъд ма роца бойчен дрлеп щм дъзмъ дощйод");
if(IsPlayerInAnyVehicle(playerid)) return SendClientMessage(playerid,COLOR_KRED, "! аъд роца бшлб, ара ца одшлб тм оръ мдъзйм аъ дощйод");
// ====== Mission starting ======= //
InPizzaMission[playerid] = 1;
PizzaMissionStarted = 1;
userdata[playerid][pizzatimer] = (gettime() + 600);
SaveUserFile(playerid);
foreach (new i : Player)
{
---- PizzaCar = CreateVehicle(448, -2265.7061,534.7355,34.7427,271.6508, 1, 1, -1);
new Text3D:PIZZA = Create3DTextLabel("PizzaBoy", 0x00C7FFFF, 30.0, 60.0, 50.0, 40.0, 0);
Attach3DTextLabelToPlayer(PIZZA, playerid, 0.0, 0.0, 0.7);
----- }
SetPlayerVirtualWorld(playerid, 953);
SetVehicleVirtualWorld(PizzaCar, 953);
TextDrawShowForPlayer(playerid,MissionTimeTD[playerid]);
PutPlayerInVehicle(playerid, PizzaCar, 0);
DisablePlayerRaceCheckpoint(playerid);
SetPlayerRaceCheckpoint(playerid, 1, -1284.8553,44.7940,13.7093, 0.0, 0.0, 0.0, 30);
SendClientMessage(playerid, COLOR_GREEN,"!дъзмъ аъ дощйод");
format(String,sizeof(String),"{FFFFFF}**{FF9900}[Mission System]: !дъзйм аъ ощйоъ дфйцд {FFFFFF}%s {FF9900}дщзчп",GetName(playerid));
SendClientMessageToAll(COLOR_GREEN,String);
PizzaMission2[playerid] = SetTimerEx("PizzaMission", (60000 * 2), false, "i", playerid);
CountDown(120);
SendClientMessage(playerid, COLOR_KRED, "!мшщеък 2 гчеъ мдтбшъ дощмез, щйдйд бдцмзд");
return 1;
}

Hello Guys, I've made a mission and currently I have a little problem...
I want to make Attach3DTextLabel "PizzaBoy" to the player.
:X I hope you guys can help me.
Btw sorry about my english
Reply
#2

Can you please translate your code to english, can't understand anything at all. And also, fix your identation.
Reply
#3

Quote:
Originally Posted by willbedie
Посмотреть сообщение
Can you please translate your code to english, can't understand anything at all. And also, fix your identation.


Quote:

if(dialogid == 538 && response)
{
format(String, sizeof(String), "You have to wait more %d minutes in order to start the mission again.", (userdata[playerid][pizzatimer] - gettime())/60);
if(userdata[playerid][pizzatimer] - gettime() > 0) return SendClientMessage(playerid, COLOR_KRED, String);

if(PizzaMissionStarted == 1) return SendClientMessage(playerid, COLOR_KRED, "Someone is already doing the mission.");
if(InPizzaMission[playerid] == 1) return SendClientMessage(playerid, COLOR_KRED, "You're already started the mission !");
if(!CPS_IsPlayerInCheckpoint(playerid, CP_StartPizzaMission))return SendClientMessage(playerid, COLOR_KRED, "You're not in the checkpoint");
if(IsPlayerInAnyVehicle(playerid)) return SendClientMessage(playerid,COLOR_KRED, "Get Out from the vehicle.");
// ====== Mission starting ======= //
InPizzaMission[playerid] = 1;
PizzaMissionStarted = 1;
userdata[playerid][pizzatimer] = (gettime() + 600);
SaveUserFile(playerid);
foreach (new i : Player)
{
PizzaCar = CreateVehicle(448, -2265.7061,534.7355,34.7427,271.6508, 1, 1, -1);
new Text3D:PIZZA = Create3DTextLabel("PizzaBoy", 0x00C7FFFF, 30.0, 60.0, 50.0, 40.0, 0);
Attach3DTextLabelToPlayer(PIZZA, playerid, 0.0, 0.0, 0.7);
}
SetPlayerVirtualWorld(playerid, 953);
SetVehicleVirtualWorld(PizzaCar, 953);
TextDrawShowForPlayer(playerid,MissionTimeTD[playerid]);
PutPlayerInVehicle(playerid, PizzaCar, 0);
DisablePlayerRaceCheckpoint(playerid);
SetPlayerRaceCheckpoint(playerid, 1, -1284.8553,44.7940,13.7093, 0.0, 0.0, 0.0, 30);
SendClientMessage(playerid, COLOR_GREEN,"You've started a pizza mission.");
format(String,sizeof(String),"{FFFFFF}**{FF9900}[Mission System]: Just started a pizza mission",GetName(playerid));
SendClientMessageToAll(COLOR_GREEN,String);
PizzaMission2[playerid] = SetTimerEx("PizzaMission", (60000 * 2), false, "i", playerid);
CountDown(120);
SendClientMessage(playerid, COLOR_KRED, "You have 2 minutes to make the delivery.");
return 1;
}




Sorry, there you go
Reply
#4

You'll have to use CreatePlayer3DTextLabel for that, I know you can do it with Create3DTextLabel too, but if you want to attach the label to the player, then it's best you use this.

There's a good tutorial on wiki on how to work / attach 3D text label to a player, here you go:

https://sampwiki.blast.hk/wiki/CreatePlayer3DTextLabel
Reply
#5

Quote:
Originally Posted by willbedie
Посмотреть сообщение
You'll have to use CreatePlayer3DTextLabel for that, I know you can do it with Create3DTextLabel too, but if you want to attach the label to the player, then it's best you use this.

There's a good tutorial on wiki on how to work / attach 3D text label to a player, here you go:

https://sampwiki.blast.hk/wiki/CreatePlayer3DTextLabel
I did all you said & all explained on SA-MP Wiki.
But still doesn't result yet... can you tell me why is that?

Quote:

PizzaCar = CreateVehicle(448, -2265.7061,534.7355,34.7427,271.6508, 1, 1, -1);
new Float:X, Float:Y, Float:Z;
GetPlayerPos(playerid, X, Y, Z);
new Text3D:Test = Create3DTextLabel("Pizza Driver", 0x00C7FFFF, X, Y, Z, 40.0, 0);
Attach3DTextLabelToPlayer(Test, playerid, 0.0, 0.0, 0.7);

Reply
#6

Quote:
Originally Posted by SaMuRy
Посмотреть сообщение
I did all you said & all explained on SA-MP Wiki.
But still doesn't result yet... can you tell me why is that?
Use new PlayerText3D:Test and
CreatePlayer3DTextLabel instead of Create3DTextLabel
Reply
#7

Quote:
Originally Posted by willbedie
Посмотреть сообщение
Use new PlayerText3D:Test and
CreatePlayer3DTextLabel instead of Create3DTextLabel
I don't want it for the player, I want it for everyone you understand ? That's why I am using "Create3DTextLabel" instead of "CreatePlayer3DTextLabel". All the server have to look on it.
Reply
#8

Quote:
Originally Posted by SaMuRy
Посмотреть сообщение
I don't want it for the player, I want it for everyone you understand ? That's why I am using "Create3DTextLabel" instead of "CreatePlayer3DTextLabel". All the server have to look on it.
What do you mean, you want to attach the label to all players online or what? If you want to attach the label to a single player, everyone will see the label when they are near the range position you've set to your script.
Reply
#9

Explain in detail what exactly you want to do, because I do not understand anything at all.
Reply
#10

Quote:
Originally Posted by Undef1ned
Посмотреть сообщение
Explain in detail what exactly you want to do, because I do not understand anything at all.
I am trying to make a TextLabel. I made a command /PCar - Police Cars. When I'm using this command ill get a vehicle. I just wanna to get the textlabel on the player. when he's in the vehicle. "Police Car".
When he will ExitVehicle, ill Destroy the car & the textlabel.
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)