Update3DTextLabel help
#6

Код:
new Text3DTimer;
new Text3DTimer2;
new getcar = GetPlayerVehicleID(MAX_PLAYERS);
new Text3D:vehicle3Dtext[MAX_VEHICLES];
-------------------------------------------------------------
if(strcmp(cmd, "/emergency", true) == 0)
{

if(!IsACop(playerid)) return SendClientMessage(playerid, 0xFFFFFFAA, "You are not a cop");
if(!(IsPlayerInAnyVehicle(playerid))) return SendClientMessage(playerid, COLOR_BLUE, "You must be in vehicle");
vehicle3Dtext[getcar] = Create3DTextLabel("Police Emergency", -1, 0.0, 0.0, 0.0, 50.0, 0, 1);
Attach3DTextLabelToVehicle(vehicle3Dtext[getcar], getcar, -0.8, -2.8, -0.3);
SendClientMessage(playerid, COLOR_BLUE, "USAGE: /stopemergency- when done.");
Text3DTimer = SetTimer("UpdateText3D", 4000, true);
return 1;
}

if(strcmp(cmd, "/stopemergency", true) == 0)
{

if(!IsACop(playerid)) return SendClientMessage(playerid, 0xFFFFFFAA, "You are not a cop");
if(!(IsPlayerInAnyVehicle(playerid))) return SendClientMessage(playerid, COLOR_BLUE, "You must be in vehicle");
Delete3DTextLabel(vehicle3Dtext[getcar]);
KillTimer(Text3DTimer);
KillTimer(Text3DTimer2);
return 1;
}
-------------------------------------------------------------
forward UpdateText3D(); public UpdateText3D() {

	Update3DTextLabelText(vehicle3DText[getcar], 0xFFFFF, "Keep Back");
	Text3DTimer2 = SetTimer("UpdateText3D2", 4000, true);
	KillTimer(Text3DTimer);
	return 1;

}

forward UpdateText3D2(); public UpdateText3D2() {

	Update3DTextLabelText(vehicle3DText[getcar], 0xFFFFF, "Police Emergency");
	Text3DTimer2 = SetTimer("UpdateText3D", 4000, true);
	KillTimer(Text3DTimer2);
	return 1;

}
Here is what I did, but I can't compile because it crashes.. any errors here or something ?
Reply


Messages In This Thread
Update3DTextLabel help - by nemanjasepa - 19.10.2016, 13:06
Re: Update3DTextLabel help - by nemanjasepa - 21.10.2016, 11:33
Re: Update3DTextLabel help - by Threshold - 21.10.2016, 11:39
Re: Update3DTextLabel help - by nemanjasepa - 21.10.2016, 11:47
Re: Update3DTextLabel help - by s4kuL - 21.10.2016, 12:00
Re: Update3DTextLabel help - by nemanjasepa - 21.10.2016, 12:17
Re: Update3DTextLabel help - by Yaa - 21.10.2016, 12:32
Re: Update3DTextLabel help - by nemanjasepa - 21.10.2016, 12:36
Re: Update3DTextLabel help - by nemanjasepa - 21.10.2016, 12:46
Re: Update3DTextLabel help - by ThatFag - 21.10.2016, 13:03

Forum Jump:


Users browsing this thread: 3 Guest(s)