CMD:lockls(playerid, params[])
{
new string[128];
if(PlayerInfo[playerid][pMember] == 6 || PlayerInfo[playerid][pMember] == 1 || PlayerInfo[playerid][pMember] == 2 || (PlayerInfo[playerid][pMember] == 4 && PlayerInfo[playerid][pDivision] == 2) || (PlayerInfo[playerid][pMember] == 4 && PlayerInfo[playerid][pRank] >= 5) || PlayerInfo[playerid][pMember] == 7 || PlayerInfo[playerid][pMember] == 5 || PlayerInfo[playerid][pLeader] == 5 || PlayerInfo[playerid][pMember] == 11 || PlayerInfo[playerid][pLeader] == 11)
{
SendClientMessageEx(playerid, COLOR_LIGHTBLUE, "* All the exits from Los-Santos locked!");
format(string, sizeof(string), "All the exits from Los-Santos locked by %s ))", GetPlayerNameEx(playerid));
SetDynamicObjectRot(CheckPointGates[2], 0.00000000,89.69036865,80.17822266);
CheckPointGateStatus[2] = 1;
SetDynamicObjectRot(CheckPointGates[3], 0.00000000,269.94769287,82.48538208);
CheckPointGateStatus[3] = 1;
new Text3D:LS1T;
LS1T = Create3DTextLabel("Arrest Point\n{FFFF00}/arrest to arrest a criminal", COLOR_BLUE, 662.7000100,-1225.0999800,15.7000000, 12);
}
}
That is a local variable. Are you saving the return from "Create3DTextLabel" so that you can manipulate it (change/hide it) in the future after having shown it to the player? If so, you will need a global variable - locals are lost when the function they are in ends.
|
#pragma unused LS1T
I don't get what you want to do...
Anyways that kind of warning is harmless, if the message annoys you you can put this on top of the script: pawn Код:
|
Create3DTextLabel("Arrest Point\n{FFFF00}/arrest to arrest a criminal", COLOR_BLUE, 662.7000100,-1225.0999800,15.7000000, 12);
However, if he only wants a 3D label at those coordinates and nothing else, he must use only:
pawn Код:
|
But i want to save that as a variable!
I Want that i will be able to destroy this text... |
Okay then! Make it global variable, assign the ID of the 3D Label to it and add the code you want to destroy it. It'll be fine after that.
|
new LS1T;
CMD:lockls(playerid, params[])
{
new string[128];
if(PlayerInfo[playerid][pMember] == 6 || PlayerInfo[playerid][pMember] == 1 || PlayerInfo[playerid][pMember] == 2 || (PlayerInfo[playerid][pMember] == 4 && PlayerInfo[playerid][pDivision] == 2) || (PlayerInfo[playerid][pMember] == 4 && PlayerInfo[playerid][pRank] >= 5) || PlayerInfo[playerid][pMember] == 7 || PlayerInfo[playerid][pMember] == 5 || PlayerInfo[playerid][pLeader] == 5 || PlayerInfo[playerid][pMember] == 11 || PlayerInfo[playerid][pLeader] == 11)
{
SendClientMessageEx(playerid, COLOR_LIGHTBLUE, "* All the exits from Los-Santos locked!");
format(string, sizeof(string), "All the exits from Los-Santos locked by %s ))", GetPlayerNameEx(playerid));
SetDynamicObjectRot(CheckPointGates[2], 0.00000000,89.69036865,80.17822266);
CheckPointGateStatus[2] = 1;
SetDynamicObjectRot(CheckPointGates[3], 0.00000000,269.94769287,82.48538208);
CheckPointGateStatus[3] = 1;
//Morha13 Advanced Gates Start - New Gate Text
LS1T = CreateDynamic3DTextLabel("This is test text!", COLOR_BLUE, 0.00000000,269.94769287,82.48538208, 12);
//Morha13 Advanced Gates End - New Gate Text
}
}
C:\Users\Mor\Downloads\Vas-Rp\gamemodes\VasRpV0.15Alpha.pwn(32364) : warning 213: tag mismatch C:\Users\Mor\Downloads\Vas-Rp\gamemodes\VasRpV0.15Alpha.pwn(32364) : warning 204: symbol is assigned a value that is never used: "LS1T"