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



Help - RuNBoY - 15.07.2015

How can i make When player enters in dm he cant use any command but when exits he can.?


Re: Help - RuNBoY - 15.07.2015

someone?


Re: Help - fuckingcruse - 15.07.2015

Easy make a bool when he enters the dm , and a leave cmd , except /leave he can't use any cmd.. and when he leaves the dm set the bool false.


Re: Help - RuNBoY - 15.07.2015

What?


Re: Help - notime - 15.07.2015

Quote:
Originally Posted by RuNBoY
Посмотреть сообщение
What?
Read the basic scripting on the samp wiki.


Re: Help - RuNBoY - 15.07.2015

Any more help?


Re : Help - KillerDVX - 15.07.2015

PHP код:
new InEvent[MAX_PLAYERS]; 
=> On top of your scripts.

At each command, add
PHP код:
"InEvent[playerid] == 1" 
.

If it's 1, it means that the player's in the event.

If it's 0, it means that the player's not in the event.

KillerDVX,



Re: Help - RuNBoY - 15.07.2015

so if i add this "InEvent[playerid] == 1" do my dm command he cant go somewhere else?


Re : Help - KillerDVX - 15.07.2015

When you create a DM event, and the player join it add :

PHP код:
InEvent[playerid] = 1
When he exits add :

PHP код:
InEvent[playerid] = 0



Re: Help - RuNBoY - 15.07.2015

It need to be like this?


Join:
Код:
CMD:dm1(playerid, params[])
{
	SendClientMessage(playerid, COLOR_YELLOW, "Welcome to DM1");
    InEvent[playerid] = 1;
	SetPlayerPos(Pos);
	return 1;
}
Leave:
Код:
CMD:Leave(playerid, params[])
{
    InEvent[playerid] = 0;
	SetPlayerPos(playerid, pos);
	return 1;
}