Vice City Multiplayer
VC:MP 0.3 => mIRC/pawn Scripting => Topic started by: RasikhQadeer on December 25, 2011, 06:44:55 am
-
Help Me I Have This Mute cmd look: if(strcmp(cmd,"mute",true) == 0)
{
if(IsPlayerAdmin(playerid))
{
new plr;
tmp = strtok(cmdtext, idx), plr = FindPlayerIDFromString(tmp);
if (!strlen(tmp)) SendClientMessage(playerid,COLOR_RED,"USAGE: /c mute [Nick/ID]");
else if (plr == INACTIVE_PLAYER_ID) SendClientMessage(playerid,COLOR_RED,"Error: Unknown player");
else {
if(IsMuted[plr] == 0)
{
IsMuted[plr];
new str[256];
format(str,sizeof(str),"ADMIN %s Muted %s for a long time...",gPlayers[playerid],gPlayers[plr]);
SendClientMessageToAll(COLOR_WHITE,str);
SendClientMessage(plr,COLOR_RED,"Stop talking or you will be kicked...");
}
else
{
SendClientMessage(playerid,COLOR_RED,"You cannot mute him 2 times..");
}
}
}
return 1;
}
else if(strcmp(cmd,"unmute",true) == 0)
{
if(IsPlayerAdmin(playerid))
{
new plr;
tmp = strtok(cmdtext, idx), plr = FindPlayerIDFromString(tmp);
if (!strlen(tmp)) SendClientMessage(playerid,COLOR_RED,"USAGE: /c mute [Nick/ID]");
else if (plr == INACTIVE_PLAYER_ID) SendClientMessage(playerid,COLOR_RED,"Error: Unknown player");
else {
if(IsMuted[plr] == 1)
{
IsMuted[plr] = 0;
new str[256];
format(str,sizeof(str),"ADMIN %s unmuted %s...",gPlayers[playerid],gPlayers[plr]);
SendClientMessageToAll(COLOR_WHITE,str);
SendClientMessage(plr,COLOR_RED,"You are free to talk...");
}
else
{
SendClientMessage(playerid,COLOR_RED,"You cannot unmute him without being muted..");
}
}
}
return 1;
}
and onplayertext: if(IsMuted[playerid] == 1)
{
new str[256];
format(str,sizeof(str),"%s was been kicked for revealing the bannana from his mouth..",gPlayers[playerid]);
SendClientMessageToAll(COLOR_WHITE,str);
Kick(playerid);
return 0;
}
}
return 1;
but the problem is that the server does not kick him??? why??? :-\
-
Try Adding This
[pawn]new IsMuted[MAX_PLAYERS];
new gPlayers[MAX_PLAYERS][MAX_PLAYER_NAME+1];[/pawn]
at the top of script
-
You dont even define when the player talk...
[pawn]
public OnPlayerText(playerid, cmdtext[])
{
if(Muted][playerid] == 1)
{
new str[256];
format(str,sizeof(str),"%s ha sido kickeado por hablar mientras ha sido mandado a callar..",gPlayers[playerid]);
SendClientMessageToAll(COLOR_YELLOW,str);
Kick(playerid);
return 0;
}[/pawn]
PD: I did this simple middle script to you cuz mine is too diferent, my PAWN is in spanish, lol.
-
i have defined isplayermuted but not the second and yes i have put the fucktion!
-
Atleast, give me some credits ( or to aXXo lol ).
Top :
[pawn] enum Info
{
Muted
}[/pawn]
[pawn]new PlayerInfo[MAX_PLAYERS][Info];[/pawn]
On Player Disconnect:
[pawn] PlayerInfo[playerid][Muted] = 0;[/pawn]
On Player Connect:
[pawn]new PlayerInfo[MAX_PLAYERS][Info];[/pawn]
The command :
[pawn] else if(strcmp(cmd,"mute",true) == 0)
{
if(IsPlayerAdmin(playerid))
{
new plr;
tmp = strtok(cmdtext, idx), plr = FindPlayerIDFromString(tmp);
if (!strlen(tmp)) SendClientMessage(playerid,COLOR_RED,"USAGE: /c mute [Nick/ID]");
else if (plr == INACTIVE_PLAYER_ID) SendClientMessage(playerid,COLOR_RED,"Error: Unknown player");
else {
if(PlayerInfo[plr][Muted] == 0)
{
PlayerInfo[plr][Muted] = 1;
new str[256];
format(str,sizeof(str),"ADMIN %s Muted %s for a long time...",gPlayers[playerid],gPlayers[plr]);
SendClientMessageToAll(COLOR_WHITE,str);
SendClientMessage(plr,COLOR_RED,"Stop talking or you will be kicked...");
}
else
{
SendClientMessage(playerid,COLOR_RED,"You cannot mute him two times..");
}
}
}
return 1;
}[/pawn]
The unmute Command
[pawn] else if(strcmp(cmd,"unmute",true) == 0)
{
if(IsPlayerAdmin(playerid))
{
new plr;
tmp = strtok(cmdtext, idx), plr = FindPlayerIDFromString(tmp);
if (!strlen(tmp)) SendClientMessage(playerid,COLOR_RED,"USAGE: /c unmute [Nick/ID]");
else if (plr == INACTIVE_PLAYER_ID) SendClientMessage(playerid,COLOR_RED,"Error: Unknown player");
else {
if(PlayerInfo[plr][Muted] == 1)
{
PlayerInfo[plr][Muted] = 0;
new str[256];
format(str,sizeof(str),"ADMIN %s unmuted %s...",gPlayers[playerid],gPlayers[plr]);
SendClientMessageToAll(COLOR_WHITE,str);
SendClientMessage(plr,COLOR_RED,"You are free to talk...");
}
else
{
SendClientMessage(playerid,COLOR_RED,"You cannot unmute him without being muted..");
}
}
}
return 1;
}[/pawn]
On Player Text:
[pawn] if(PlayerInfo[playerid][Muted] == 1)
{
new str[256];
format(str,sizeof(str),"%s was been kicked for revealing the bannana from his mouth..",gPlayers[playerid]);
SendClientMessageToAll(COLOR_WHITE,str);
Kick(playerid);
return 0;
}
[/pawn]
-
yessssss this work :)
nice shadow
-
E:\FCV5~1.0\GAMEMO~1\FC.pwn(134) : warning 219: local variable "PlayerInfo" shadows a variable at a preceding level
E:\FCV5~1.0\GAMEMO~1\FC.pwn(134) : error 017: undefined symbol "Info"
E:\FCV5~1.0\GAMEMO~1\FC.pwn(134) : error 009: invalid array size (negative or zero)
E:\FCV5~1.0\GAMEMO~1\FC.pwn(161) : error 017: undefined symbol "CompariseIp"
E:\FCV5~1.0\GAMEMO~1\FC.pwn(177) : error 017: undefined symbol "StatusTag"
E:\FCV5~1.0\GAMEMO~1\FC.pwn(277) : error 017: undefined symbol "DecPlayerHandCash"
E:\FCV5~1.0\GAMEMO~1\FC.pwn(278) : error 017: undefined symbol "IncPlayerDeaths"
E:\FCV5~1.0\GAMEMO~1\FC.pwn(294) : error 017: undefined symbol "IncPlayerHandCash"
E:\FCV5~1.0\GAMEMO~1\FC.pwn(295) : error 017: undefined symbol "IncPlayerKills"
E:\FCV5~1.0\GAMEMO~1\FC.pwn(299) : error 017: undefined symbol "DecPlayerHandCash"
E:\FCV5~1.0\GAMEMO~1\FC.pwn(300) : error 017: undefined symbol "IncPlayerDeaths"
E:\FCV5~1.0\GAMEMO~1\FC.pwn(351) : error 017: undefined symbol "LoadSkins"
E:\FCV5~1.0\GAMEMO~1\FC.pwn(352) : error 017: undefined symbol "LoadSpawnCharacters"
E:\FCV5~1.0\GAMEMO~1\FC.pwn(353) : error 017: undefined symbol "LoadVehicles"
E:\FCV5~1.0\GAMEMO~1\FC.pwn(354) : error 017: undefined symbol "LoadPickups"
E:\FCV5~1.0\GAMEMO~1\FC.pwn(355) : error 017: undefined symbol "SetServerConfiguration"
E:\FCV5~1.0\GAMEMO~1\FC.pwn(371) : error 017: undefined symbol "InitWepList"
E:\FCV5~1.0\GAMEMO~1\FC.pwn(393) : error 017: undefined symbol "IsLoggedIn"
E:\FCV5~1.0\GAMEMO~1\FC.pwn(401) : error 017: undefined symbol "encrypt"
E:\FCV5~1.0\GAMEMO~1\FC.pwn(424) : error 017: undefined symbol "IsRegistered"
E:\FCV5~1.0\GAMEMO~1\FC.pwn(425) : error 017: undefined symbol "IsLoggedIn"
E:\FCV5~1.0\GAMEMO~1\FC.pwn(430) : error 017: undefined symbol "encrypt"
E:\FCV5~1.0\GAMEMO~1\FC.pwn(448) : error 017: undefined symbol "UpDateFile"
E:\FCV5~1.0\GAMEMO~1\FC.pwn(449) : error 017: undefined symbol "UpDateFile"
E:\FCV5~1.0\GAMEMO~1\FC.pwn(452) : error 017: undefined symbol "StatusTag"
E:\FCV5~1.0\GAMEMO~1\FC.pwn(482) : error 017: undefined symbol "UpDateFile"
E:\FCV5~1.0\GAMEMO~1\FC.pwn(493) : error 017: undefined symbol "FindPlayerIDFromString"
Compilation aborted.Pawn compiler 3.0.3367 Copyright (c) 1997-2005, ITB CompuPhase
26 Errors.
I removed all the previous mute cmd texts for new after i carefuly removed the previous mute cmd i wated to compile it for backup and this hapen to me ;(
-
Lol.... The script Shadow gave is for GUPS.
Edit: SOrry, its your script problem...
-
oh :o
-
Can SomeOne make me a filterscript for that cuz its not taing with gamemode!
-
Shadow, I know I'm not the one to judge but what you're doing isn't helpful at all. You could try and tell people what is wrong with their commands before presenting alternatives that they'll lazily copy and never learn from. People ask for help to understand, not to memorise.
-
Well man this i made for you!
;D
http://www.megaupload.com/?d=ZLB4MMPA
-
I wont use it and no thx cuz showing your self too good that is made by shadow and change the credits so SO easily no no baby! i can convert .amx's to .pwn wait and watch Ha! nice try! 8)
-
MOTHER FUCKER NOOBISH
See again and talking shit if you dont know how to read.
I only putted By dilson alone y kicked.
But in other sides i putto by Dilson and Shadow But i will delete it fucking noob
-
dilson you needa to chill
your problem is that you copy & pasted, but didnt do it well.. you need to define the variables to keep em running.
-
i'm talking about rakish.. he copy and pasted..
-
:O sorry man i really sorry i thought you were talking about me...
LAST POST DELETED
-
:O sorry man i really sorry i thought you were talking about me...
LAST POST DELETED
np man.. that stuff happens
-
PD: Your little brother is my young admin xD.... lvl 7-8
-
PD: Your little brother is my young admin xD.... lvl 7-8
i know.. that las vegas roleplay, i played once. got bored, u need to make stuff more fun and make the stuff spanish.
-
You join us before now we are in the hight lvl man 14/20 , 10/20 better than Argo we have:
Fuel System
Skin System (on day, buy a skin and always you spawn your skin will be putted)
Wep saved System (You can save your weps)
And much more but i cant tell you xD you need to test it or go to see your little brother playing
-
thanks for those excellent words dilson and yea i wil ask someone else to make filterscript of it. So i am sorry don't angry and thanks for the stupid help!
-
Pawn do not have mute function..
it was copied from black panther 0.6 :(