CMD:command(playerid, params[])
new Text3D:MyLabel;
new Text3DTimer;
public OnGameModeInit() {
MyLabel = Create3DTextLabel("1", color, x, y, z, DrawDistance, VirtualWorld, testLOS);
Text3DTimer = SetTimer("UpdateText3D", 2000, true);
return 1;
}
forward UpdateText3D(); public UpdateText3D() {
Update3DTextLabelText(MyLabel, color, "2");
KillTimer(Text3DTimer);
return 1;
}
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; }
if(!(IsPlayerInAnyVehicle(playerid))) return SendClientMessage(playerid, COLOR_BLUE, "You must be in vehicle"); To if(!IsPlayerInAnyVehicle(playerid)) return SendClientMessage(playerid, COLOR_BLUE, "You must be in vehicle"); |
new getcar = GetPlayerVehicleID(MAX_PLAYERS);
vehicle3Dtext[getcar]
vehicle3Dtext[playerid]