Problem with removing text label
#1

Hello guys,

I'm scripting i have been working on a casino script since a few days and i have a problem with removing a 3d textlabel. It removes for the player who peformed the command, But it doesn't remove for other players inside the casino.
http://i.imgur.com/r7Zl9iS.jpg

Code:
Код:
YCMD:hostroulette(playerid, params[]) {
	new betmin,betmax;
	new string[128];
	new Text3D:roulette = Create3DTextLabel("CASINO", X11_ORANGE, 30.0, 40.0, 50.0, 40.0, 0);
	if(!sscanf(playerid,params,"ii",betmin,betmax)) {
	 	if(GetPVarInt(playerid,"hosting") == 1)
    	        {
    	               DeletePlayer3DTextLabel(playerid, roulette);
        	       SendClientMessage(playerid, X11_TOMATO_2,"[CASINO] You stopped hosting roulette.");
	               SetPVarInt(playerid, "hosting", 0);
        	       SetPVarInt(playerid, "MinimumBet", 0);
        	       SetPVarInt(playerid, "MaximumBet", 0);
    	         } else {
			SetPVarInt(playerid, "MinimumBet", betmin);
			SetPVarInt(playerid, "MaximumBet", betmax);
			SetPVarInt(playerid, "hosting", 1);
			Attach3DTextLabelToPlayer(roulette, playerid, 0.0, 0.0, 0.4);
			format(string, sizeof(string), "Roulette Dealer\n $%d - $%d", betmin, betmax);
			Update3DTextLabelText(roulette, X11_ORANGE, string);
		}
	} else {
	    SendClientMessage(playerid, X11_TOMATO_2,"[CASINO] /hostroulette [minimumbet] [maximumbet]");
	}
	if(IsPlayerInRangeOfPoint(playerid, 30.0, 2235.9666, 1613.1771, 1006.1797)) {
    } else {
 		SendClientMessage(playerid, X11_TOMATO_2, "You are not in a casino or not close enough at the roulette tables!");
 	}
 	return 1;
}
Reply


Messages In This Thread
Problem with removing text label - by kelvinis - 15.06.2016, 13:57
Re: Problem with removing text label - by F1N4L - 15.06.2016, 14:09
Re: Problem with removing text label - by Vince - 15.06.2016, 14:11
Re: Problem with removing text label - by kelvinis - 15.06.2016, 14:18
Re: Problem with removing text label - by kelvinis - 15.06.2016, 17:24
Re: Problem with removing text label - by kelvinis - 16.06.2016, 13:25
Re: Problem with removing text label - by Sjn - 16.06.2016, 13:40
Re: Problem with removing text label - by kelvinis - 16.06.2016, 13:46
Re: Problem with removing text label - by kelvinis - 16.06.2016, 14:16
Re: Problem with removing text label - by kelvinis - 16.06.2016, 16:37

Forum Jump:


Users browsing this thread: 5 Guest(s)