SA-MP Forums Archive
WTF 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: WTF Help (/showthread.php?tid=357274)



WTF Help - kaloqn54 - 06.07.2012

how do you do when you have 0g drugs the command can't be used

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



Re: WTF Help - .FuneraL. - 06.07.2012

pawn Код:
if (strcmp("/usedrug Heroin", cmdtext, true, 14) == 0)
    {
                  if(Heroin[playerid] == 0) return SendClientMessage(playerid, -1, "Not Have Heroin, Use /buy Heroin");
                  SendClientMessage(playerid, 0xFF0000AA, "Ти изпозва 1 грам Хероин");
            Heroin[playerid]--;
            SetPlayerDrunkLevel(playerid, 60);
            SetPlayerWeather(playerid, 21);
            SetPlayerTime(playerid, 23, 00);
            return 1;
    }
Try.


Re: WTF Help - miikeyy45 - 06.07.2012

You just need better scripting, that's all :P


Re: WTF Help - kaloqn54 - 06.07.2012

Quote:
Originally Posted by .FuneraL.
Посмотреть сообщение
pawn Код:
if (strcmp("/usedrug Heroin", cmdtext, true, 14) == 0)
    {
                  if(Heroin[playerid] == 0) return SendClientMessage(playerid, -1, "Not Have Heroin, Use /buy Heroin");
                  SendClientMessage(playerid, 0xFF0000AA, "Ти изпозва 1 грам Хероин");
            Heroin[playerid]--;
            SetPlayerDrunkLevel(playerid, 60);
            SetPlayerWeather(playerid, 21);
            SetPlayerTime(playerid, 23, 00);
            return 1;
    }
Try.
thx so much


Quote:
Originally Posted by miikeyy45
Посмотреть сообщение
You just need better scripting, that's all :P
Fuckoff


Re: WTF Help - iGetty - 06.07.2012

Quote:
Originally Posted by kaloqn54
Посмотреть сообщение
thx so much




Fuckoff
I agree, there was no need in that. Just don't tell people "You just need better scripting, that's all :P"

It's not very nice is it?