Mute at request spawn - 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: Mute at request spawn (
/showthread.php?tid=201451)
Mute at request spawn -
thimo - 21.12.2010
Hey i wanna make that if you are requesting spawn you are muted and if you spawn you get unmuted pls help i dont know how
Like:
OnPlayerRequestSpawn(playerid)
Mute[playerid] == 1;
and if you try send text while request spawn then he needs to say Spawn first!
Re: Mute at request spawn -
ExeC - 21.12.2010
Hey,
Add this:
At the top of your gamemode,
then add this:
On 'OnPlayerRequestSpawn',
then add:
pawn Код:
if(Muted[playerid] == 1)
{
return 0;
}
On 'OnPlayerText'
Then add:
On 'OnPlayerSpawn'.
I hope it works, it was fast made though.
Re: Mute at request spawn -
Seven. - 21.12.2010
pawn Код:
new pMuted[MAX_PLAYERS] = 0;
public OnPlayerRequestSpawn(playerid)
{
pMuted[playerid] = 1;
return true;
}
public OnPlayerSpawn(playerid)
{
pMuted[playerid] = 0;
return true;
}
public OnPlayerText(playerid,text[])
{
if(pMuted[playerid] == 1) return 0;
}
}
Re: Mute at request spawn -
NeTuddMeg - 21.12.2010
Код:
new pMuted[MAX_PLAYERS] = 0;
public OnPlayerRequestSpawn(playerid)
{
pMuted[playerid] = 1;
return true;
}
public OnPlayerSpawn(playerid)
{
pMuted[playerid] = 0;
return true;
}
public OnPlayerText(playerid,text[])
{
if(pMuted[playerid] == 1) return 0;
}
It's Works..