Teleport - 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: Teleport (
/showthread.php?tid=515983)
Teleport -
Ananisiki - 29.05.2014
I created just a textdraw there i added "Show TP's ON/OFF"
if it is on, it will show messages when other players teleport to places
if it is off, it will hide messages, how i can do this
Re: Teleport -
Ciandlah - 29.05.2014
Hopefully this helps you out.
Код:
new TPon;
public OnGameModeInit
{
TPon = 0;
return 1;
}
public OnPlayerCommandText(playerid, cmdtext[])
{
if(strcmp("/enabletps",cmdtext,true)==0)
{
if(IsPlayerAdmin(playerid))
{
if(TPon = 0)
{
TPon = 1;
//etc the rest of your code here that notifys admins
}
else if(TPon = 1)
{
TPon = 0;
SendClientMessageToAll(playerid, -1, "An Admin has Just Turned The Notes Off");
}
}
else return SendClientMessage(playerid, -1, "You are not admin, therfore you cannot use this command");
return 1;
}
return 0;
}