SA-MP Forums Archive
Please help - 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: Please help (/showthread.php?tid=357256)



Please help - kaloqn54 - 06.07.2012

How to make it when you have gram of the drug to use

Код:
if (strcmp("/usedrug Heroin", cmdtext, true, 14) == 0)
	{
            if(GetPlayerHeroin(playerid) < 10) return SendClientMessage(playerid, 0xFFFFFF, "Ти нямаш достатъчно пари.");
            SendClientMessage(playerid, 0xFF0000AA, "Ти изпозва 1 грам Хероин");
		    Heroin[playerid]--;
		    SetPlayerDrunkLevel(playerid, 60);
		    SetPlayerWeather(playerid, 21);
			SetPlayerTime(playerid, 23, 00);
		  	return 1;
    }