SA-MP Forums Archive
Question - 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)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Question (/showthread.php?tid=95306)



Question - Dj_maryo1993 - 03.09.2009

1 - It was an page of wiki with new feachures,i kan-t find it
2 - How do i give someone a bottle to drink ? i saw in tests that is possible.



Re: Question - Weirdosport - 03.09.2009

https://sampwiki.blast.hk/wiki/Category:Added_in_0.3


Re: Question - Darkstar94 - 03.09.2009

Код:
if (strcmp("/beer", cmdtext, true, 10) == 0)
	{
			SetPlayerDrunkLevel(playerid, GetPlayerDrunkLevel(playerid)+ 1500);
			SendClientMessage(playerid, 0x00FFFF, "Server: You drinked now, dont drink and drive!");
		return 1;
	}
a simple command


Re: Question - Marcus09 - 03.09.2009

Quote:
Originally Posted by GrayExodus
Код:
if (strcmp("/beer", cmdtext, true, 10) == 0)
	{
			SetPlayerDrunkLevel(playerid, GetPlayerDrunkLevel(playerid)+ 1500);
			SendClientMessage(playerid, 0x00FFFF, "Server: You drinked now, dont drink and drive!");
		return 1;
	}
a simple command
Why are you using a size of 10 in strcmp when your command is only 5 characters long?


Re: Question - Jasen - 03.09.2009

Quote:
Originally Posted by GrayExodus
Код:
if (strcmp("/beer", cmdtext, true, 10) == 0)
	{
			SetPlayerDrunkLevel(playerid, GetPlayerDrunkLevel(playerid)+ 1500);
			SendClientMessage(playerid, 0x00FFFF, "Server: You drinked now, dont drink and drive!");
		return 1;
	}
a simple command
That is right but not what Dj_maryo1993 is asking for.

Код:
	if (strcmp("/drink", cmdtext, true, 6) == 0)
	{
		SetPlayerSpecialAction(playerid, SPECIAL_ACTION_DRINK_BEER);
		SendClientMessage(playerid, COLOUR_YELLOW, "You are drinking!");
		return 1;
	}



Re: Question - Dj_maryo1993 - 03.09.2009

Quote:
Originally Posted by GrayExodus
Код:
if (strcmp("/beer", cmdtext, true, 10) == 0)
	{
			SetPlayerDrunkLevel(playerid, GetPlayerDrunkLevel(playerid)+ 1500);
			SendClientMessage(playerid, 0x00FFFF, "Server: You drinked now, dont drink and drive!");
		return 1;
	}
a simple command
Yea but doesn't give you the beer to drink , like in the beta tests.


Re: Question - Jasen - 03.09.2009

My one does.


Re: Question - Dj_maryo1993 - 03.09.2009

Found now , i should use an special animation .