23.05.2013, 16:16
pawn Код:
new rand;
CMD:setgang(playerid, params[])
{
new string[256], name[60], leader;
rand = 1000 + random(25000);
new Float:x, Float:y, Float:z;
if(sscanf(params, "us[60]", leader, name[59])) return SCM(playerid, COLOR_LIGHTRED, "USAGE: /setgang [Gang Leader (playername/id)] [Gang Name]");
if(!IsPlayerConnected(leader)) return SCM(playerid, COLOR_LIGHTRED, "[SERVER]: Invalid PlayerID!");
GetPlayerPos(playerid, x, y, z);
rand = CreateDynamicPickup(1239, 1, x, y, z);
format(string, sizeof(string), "[Official Gang Information] \n [Gang ID: %d] \n [Gang Name: %s] \n [Gang Leader: %s]", rand, name[59], GetPlayerNameEx(leader));
CreateDynamic3DTextLabel(string, COLOR_LIGHTBLUE, x, y, z, 15);
return 1;
}
CMD:unsetgang(playerid, params[])
{
new string[256];
if(sscanf(params, "d", rand)) return SCM(playerid, COLOR_LIGHTRED, "USAGE: /unsetgang [Gang ID]");
DestroyDynamicPickup(rand);
format(string, sizeof(string), "You have unset gang-id: %d.", rand);
SCM(playerid, COLOR_LIGHTRED, string);
return 1;
}
How would I make it so I can remove the text label on unset?
Thanks