SA-MP Forums Archive
is this correct? - 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: is this correct? (/showthread.php?tid=361397)



is this correct? - P<3TS - 20.07.2012

Thanks


Re: is this correct? - Matz - 20.07.2012

new Muted[MAX_PLAYERS]; // on top

pawn Код:
CMD:muteme(playerid,params [])
{
#pragma unused params
     Muted[playerid] = 1;
     SendClientMessage(playerid,color,"muted!!!");
     return 1;
}

public OnPlayerText(playerid,text)
{  
     if(Muted[playerid] == 1)
     {
     SendClientMessage(playerid,color,"error!!!!");
     return 0;
     }
     return 1;
}



Re: is this correct? - b.rock - 20.07.2012

you forgot reset the variable

public OnPlayerDisconnect(playerid, reason)
{
Muted[playerid] = 0;
}