[HELP] How to add /tpm again? - 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: [HELP] How to add /tpm again? (
/showthread.php?tid=106346)
[HELP] How to add /tpm again? -
FreddeN - 02.11.2009
The title tells it all...
Thank you
Re: [HELP] How to add /tpm again? -
klavins - 02.11.2009
what is /tpm ?
Re: [HELP] How to add /tpm again? -
MachineHead - 02.11.2009
Quote from Kye
- The client commands /pm /tpm and the server callbacks OnPlayerPrivMsg and OnPlayerTeamPrivMsg are removed. If you need a replacement /pm command please see the base.pwn filterscript.
Re: [HELP] How to add /tpm again? -
FreddeN - 02.11.2009
Alright I see... but do you know how to make your own /tpm cmd?
Re: [HELP] How to add /tpm again? -
GTA967 - 02.11.2009
in a command or OnPlayerText with a check for a certain char
Код:
new str[128],pName[MAX_PLAYER_NAME];
GetPlayerName(playerid,pName,sizeof(pName));
format(str,sizeof(str),"TeamMsg (%s): %s",pName,cmdtext/text);
for(new i = 0; i < MAX_PLAYERS; i++)
{
if(gTeam[i] == gTeam[playerid])
{
SendClientMessage(i,COLOR,str);
}
}
Re: [HELP] How to add /tpm again? -
FreddeN - 02.11.2009
Is it possible to use
Код:
if(GetPlayerTeam(playerid))
Instead of
Код:
if(gTeam[i] == gTeam[playerid])
Re: [HELP] How to add /tpm again? -
GTA967 - 02.11.2009
yes of corse
Re: [HELP] How to add /tpm again? -
FreddeN - 02.11.2009
Quote:
Originally Posted by GTA967
yes of corse
|
Great, how would that look like, I got problems to put it in...
Re: [HELP] How to add /tpm again? -
Correlli - 02.11.2009
Quote:
Originally Posted by FreddeN
Great, how would that look like, I got problems to put it in...
|
pawn Код:
if(GetPlayerTeam(i) == GetPlayerTeam(playerid))
{
// _send_the_msg_
}
Re: [HELP] How to add /tpm again? -
FreddeN - 02.11.2009
Quote:
Originally Posted by Don Correlli
Quote:
Originally Posted by FreddeN
Great, how would that look like, I got problems to put it in...
|
pawn Код:
if(GetPlayerTeam(i) == GetPlayerTeam(playerid)) { // _send_the_msg_ }
|
Alright, it almost works, just one error to fix...
Код:
if (strcmp("/tpm", cmdtext, true, 4) == 0)
{
new str[128],pName[MAX_PLAYER_NAME];
GetPlayerName(playerid,pName,sizeof(pName));
format(str,sizeof(str),"TeamMsg (%s): %s",pName,cmdtext/text);
for(new i = 0; i < MAX_PLAYERS; i++)
{
if(GetPlayerTeam(i) == GetPlayerTeam(playerid))
{
SendClientMessage(i,0xFFFF00FF,str);
}
}
}
The error is...
Код:
undefined symbol "text"