19.09.2012, 14:46
@MarTaTa ...
To fix this problem is simple ... you must increase the "DrawDistance" (the distance from where you are able to see the 3D Text Label) [highlight with color RED]
From:
To:
From what i see you want to use the player interior ...
I recommend you to use "Streamer Plugin" by Incognito ... to be able to use interior ...
Try this:
- Changed: DrawDistance [15.0 to 100.0] for Create3DTextLabel
- Changed: "if(sscanf(params, "s", text))" to "if(sscanf(params, "i", prize))" *
- Changed: Create3DTextLabel & Create3DTextLabel for CreateDynamicPickup & CreateDynamic3DTextLabel (Streamer Plugin)
- Fixed: ePointCount, some issues in script returning invalid id
- Added: ability to check if are capture point created
- Added: ePrize to enum to know the price of capture point
*
I hope that helps you out ...
Quote:
So the problem is when I create the point with /createpoint, it's good, creating it, but the 3D Text is just dissapearing .... and only the icon stays ...
|
Код:
Create3DTextLabel(text[], color, Float:X, Float:Y, Float:Z, Float:DrawDistance, virtualworld, testLOS)
Код:
Create3DTextLabel(labelstring, NICESKY, EventInfo[id][ePosX], EventInfo[id][ePosY], EventInfo[id][ePosZ], 15.0, -1, 0);
Код:
Create3DTextLabel(labelstring, NICESKY, EventInfo[id][ePosX], EventInfo[id][ePosY], EventInfo[id][ePosZ], 100.0, -1, 0);
Quote:
Код:
enum EventData { Float: ePosX, Float: ePosY, Float: ePosZ, eVW, eInterior, Text3D: eText, eCapturePlace } |
Try this:
Код:
#define MAX_EVENT_POINTS 4 enum EventData { Float: ePosX, Float: ePosY, Float: ePosZ, eVW, eInterior, Text3D: eText, eCapturePlace, ePrize } new EventInfo[MAX_EVENT_POINTS][EventData], ePointCount = -1; command(createpoint, playerid, params[]) { if(Player[playerid][AdminLevel] < 2) return 1; new string[128], prize, id = (ePointCount += 1); //Equal: ePointCount++; id = ePointCount; if(sscanf(params, "i", prize)) return SendClientMessage(playerid, NICESKY, "SYNTAX: /createpoint [prize/money/amount]"); new Float:x, Float:y, Float:z; GetPlayerPos(playerid, x, y, z); EventInfo[id][ePosX] = x; EventInfo[id][ePosY] = y; EventInfo[id][ePosZ] = z; EventInfo[id][eVW] = GetPlayerVirtualWorld(playerid); EventInfo[id][eInterior] = GetPlayerInterior(playerid); EventInfo[id][ePrize] = prize; format(string, sizeof(string), "Capture Point ID %d \n Prize: %d \n /claimpoint to claim the point", ePointCount, prize); EventInfo[id][eText] = CreateDynamic3DTextLabel(string, NICESKY, EventInfo[id][ePosX], EventInfo[id][ePosY], EventInfo[id][ePosZ], 100.0, INVALID_PLAYER_ID, INVALID_VEHICLE_ID, 0, EventInfo[id][eVW], EventInfo[id][eInterior], -1, 100.0); EventInfo[id][eCapturePlace] = CreateDynamicPickup(1274, 1, EventInfo[id][ePosX], EventInfo[id][ePosY], EventInfo[id][ePosZ], EventInfo[id][eVW], EventInfo[id][eInterior], -1, 100.0); format(string, sizeof(string), "*Capture Point ID %d created at PosX(%.3f), PosY(%.3f), PosZ(%.3f)", ePointCount, EventInfo[id][ePosX], EventInfo[id][ePosY], EventInfo[id][ePosZ]); SendClientMessage(playerid, NICESKY, string); return 1; } command(claimpoint, playerid, params[]) { new id = ePointCount; if(id == -1) { SendClientMessage(playerid, ADMINORANGE, "CLAIMPOINT: No capture point created"); return 1; } if(IsPlayerInRangeOfPoint(playerid, 7.0, EventInfo[id][ePosX], EventInfo[id][ePosY], EventInfo[id][ePosZ])) { new string[128], name[24]; GetPlayerName(playerid, name, sizeof(name)); //The line below is a comment because I did not understand for what purpose is created players[to take take the prize]/admin [to remove the capture point] ??? //GivePlayerMoney(playerid, EventInfo[id][ePrize]); DestroyDynamicPickup(EventInfo[id][eCapturePlace]); DestroyDynamic3DTextLabel(EventInfo[id][eText]); format(string, sizeof(string), "AdmWarning: %s has claimed Event Point ID %d", name, ePointCount); SendToAdmins(ADMINORANGE, string, 1); ePointCount -= 1; //Equal: ePointCount--; } else { SendClientMessage(playerid, ADMINORANGE, "CLAIMPOINT: You must be in the last capture point created"); } return 1; }
- Changed: "if(sscanf(params, "s", text))" to "if(sscanf(params, "i", prize))" *
- Changed: Create3DTextLabel & Create3DTextLabel for CreateDynamicPickup & CreateDynamic3DTextLabel (Streamer Plugin)
- Fixed: ePointCount, some issues in script returning invalid id
- Added: ability to check if are capture point created
- Added: ePrize to enum to know the price of capture point
*
Код:
Specifier(s) Name Example values i, d Integer 1, 42, -10 c Character a, o, * l Logical true, false b Binary 01001, 0b1100 h, x Hex 1A, 0x23 o Octal 045 12 n Number 42, 0b010, 0xAC, 045 f Float 0.7, -99.5 g IEEE Float 0.7, -99.5, INFINITY, -INFINITY, NAN, NAN_E u User name/id (bots and players) ******, 0 q Bot name/id ShopBot, 27 r Player name/id ******, 42