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



Message - Ananisiki - 21.04.2014

How i can do like a command

/showtp

it will show all teleport messages when a player teleports

/hidetp

it will hide the messages


Re: Message - Alex Magaсa - 21.04.2014

deleted.


Re: Message - Ananisiki - 23.04.2014

Bump


Re: Message - Fel486 - 23.04.2014

pawn Код:
bool:showtp = false; // top

if(showtp == true) // put on your command
{
    // ... messages
}


CMD:tpmsg(playerid, params[]) // Example command
{
    if(showtp == false) showtp = true;
    else showtp = false;
    return 1;
}



Re: Message - Ananisiki - 24.04.2014

I dont understand explain plz


Re: Message - Abagail - 24.04.2014

pawn Код:
new IsTPTogged[MAX_PLAYERS];
Then in your teleport command to check if they have it togged or not...
pawn Код:
if(IsTPTogged[playerid] == 0) SendClientMessage(playerid, -1, "You have been teleported by an admin.");
Then the teleporting code.

A command to toggle it would be(in ZCMD)
pawn Код:
CMD:togtpmessages(playerid, params[])
{
if(IsTPTogged[playerid] == 0)
{
IsTPTogged[playerid] == 1;
SendClientMessage(playerid, -1, "You will no longer see admin teleport messages.");
}
else
{
IsTPTogged[playerid] == 0;
SendClientMessage(playerid, -1, "You will now see admin teleport messages.");
}
return 1;
}
Hope I explained this good enough for you.


Re: Message - Ananisiki - 24.04.2014

I have like teleport commands and it sends messages to everyone when someone teleport, and i have a settings textdraw there you can turn it on / off, how i do therE?


Re: Message - Abagail - 24.04.2014

If they click the text-draw then to turn it on:
pawn Код:
IsTPTogged[playerid] = 0;
Or to turn it off,
pawn Код:
IsTPTogged[playerid] = 1;