when do a cmd, how to disable ALL the teles? - 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: when do a cmd, how to disable ALL the teles? (
/showthread.php?tid=315857)
when do a cmd, how to disable ALL the teles? -
niels44 - 04.02.2012
hey guys,
how do i make it that when a player does /deal, he cant use ANY teleport thats in the server anymore...
i dont think its too hard to make but i just dont know how XD
can anyone tell me?
greets niels
EDIT: i'm using ZCMD(if that makes difference XD)
Re: when do a cmd, how to disable ALL the teles? -
milanosie - 04.02.2012
just make a variable, and when /deal set it to 1
At the teleports, only allow it if the variable is set to 0
Re: when do a cmd, how to disable ALL the teles? -
niels44 - 04.02.2012
eehm how to make this?
XD
Re: when do a cmd, how to disable ALL the teles? -
milanosie - 04.02.2012
top of script:
pawn Код:
new cantele[MAX_PLAYERS];
at on player connect:
at /deal
at the tele command:
pawn Код:
if(tele[playerid] == 1)
{
//your code here
Re: when do a cmd, how to disable ALL the teles? -
thimo - 04.02.2012
It can be done much more easy... But i have to know if you use zcmd or just normal sa-mp command.
Edit: what you said wont work since you used if(Tele == 1) it should be if(cantele == 1)
Re: when do a cmd, how to disable ALL the teles? -
Konstantinos - 04.02.2012
pawn Код:
new
DealEnable[ MAX_PLAYERS ];
CMD:deal( playerid, params[ ] )
{
DealEnable[ playerid ] = 1;
// Rest Of Code
return 1;
}
// On Each teleport Add the following
// Ex:
CMD:teleport( playerid, params[ ] )
{
if( DealEnable[ playerid ] == 1 ) return SendClientMessage( playerid, -1, "You cannot teleport" );
// teleport Code
return 1;
}
Re: when do a cmd, how to disable ALL the teles? -
niels44 - 04.02.2012
hmm thnx dwane i like yours the most XD and thimo i use zcmd XD but i already have got help XD
btw: thimo read your PM's pls
Re: when do a cmd, how to disable ALL the teles? -
niels44 - 04.02.2012
yeah it works thnx all XD