SA-MP Forums Archive
Spraytag system not working. - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Spraytag system not working. (/showthread.php?tid=415945)



Spraytag system not working. - Arnoo - 15.02.2013

Im trying to let a player set a spray tag.
Here is my code
Код:
	if(dialogid == 420 && response) 
    {
    new tag;
    tag = CreateObject(19371, 18661, -2493.89, 2295.65, 5.23,   0.00, 0.00, 90.34);
           	switch(listitem)// Checking which listitem was selected
        	{
        	    case 0:// The first item listed
        	    {
                SetObjectMaterial(tag, 0, 19341, "egg_texts", "easter_egg01", 0xFFFFFFFF); 
        	    }
        	    case 1: // The second item listed
        	    {
        	        if(GetPlayerMoney(playerid) < 2) return SendClientMessage(playerid, 0xFFFFFF, "You don't have enough cash.");
        	        GivePlayerMoney(playerid, -2);
        	        SetPlayerSpecialAction(playerid, SPECIAL_ACTION_DRINK_BEER);
        	    }
        	    case 2: // The third item listed
        	    {
        	        if(GetPlayerMoney(playerid) < 3) return SendClientMessage(playerid, 0xFFFFFF, "You don't have enough cash.");
        	        GivePlayerMoney(playerid, -3);
        	        SetPlayerSpecialAction(playerid, SPECIAL_ACTION_DRINK_WINE);
        	    }
        	}
    }
When he selects 'Grove (case 1)' it doesnt creates a tag.
Why? And how can I fix it fast?


Re: Spraytag system not working. - Arnoo - 15.02.2013

Bump