Wysłany: 2012-11-23, 17:17
sojcef
Wiek: 36 Na forum: 5059 dni Posty: 30
Kod: CMD:mute(playerid,params[])
{
new id,time,reason[100],str[128];
if(!IsPlayerAdmin(playerid) || IsRangs(playerid, 2))
return SendClientLangMessage(playerid, 0xffffffff, "Nie jeste? Adminem!", "You are not an Admin!");
if(sscanf(params,"dds",id,time,reason))
return SendClientLangMessage(playerid, 0xffffffff, "[{c4c4c4}INFO{ffffff}] {ffffff} /mute [ID Gracza] [czas] [pow?d]", "[{c4c4c4}INFO{ffffff}] {ffffff} /mute [playerid] [time] [reason]");
SetPVarInt(id,"Muted", gettime() + (time*60) );
GetPlayerName(id,str,MAX_PLAYER_NAME);
format(strPOL, sizeof(strPOL), "[{CC0000}MUTE{ffffff}] {CC0000}%s {ffffff}zosta? wyciszony przez Admina {CC0000}%s {ffffff}[{CC0000}%s{ffffff}] [{CC0000}%d{ffffff}]", PlayerName(id), PlayerName(playerid), reason, xGetTimeString( GetPVarInt(id,"Muted")));
format(strENG, sizeof(strENG), "[{CC0000}MUTE{ffffff}] {CC0000}%s {ffffff}has been muted by Admin {CC0000}%s {ffffff}[{CC0000}%s{ffffff}] [{CC0000}%d{ffffff}]", PlayerName(id), PlayerName(playerid), reason, xGetTimeString( GetPVarInt(id,"Muted")));
SendClientLangMessageToAll(0xffffffff,strPOL, strENG);
format(strPOL, sizeof(strPOL), "[{CC0000}MUTE{ffffff}] {CC0000}Zosta?es wyciszony przez Admina {ffffff}%s [{CC0000}%s{ffffff}] [{CC0000}%d{ffffff}]", PlayerName(playerid), reason, xGetTimeString( GetPVarInt(id,"Muted")));
format(strENG, sizeof(strENG), "[{CC0000}MUTE{ffffff}] {CC0000}You have been muted by Admin {ffffff}%s [{CC0000}%s{ffffff}] [{CC0000}%d{ffffff}]", PlayerName(playerid), reason, xGetTimeString( GetPVarInt(id,"Muted")));
SendClientLangMessage(id, 0xffffffff,strPOL, strENG);
return 1;
}
CMD:unmute(playerid,params[])
{
new id;
if(!IsPlayerAdmin(playerid) || IsRangs(playerid, 2))
return SendClientLangMessage(playerid, 0xffffffff, "[{c4c4c4}INFO{ffffff}] {ffffff}Nie jeste? Adminem!", "[{c4c4c4}INFO{ffffff}] {ffffff}You are not an Admin");
if(sscanf(params,"d",id))
return SendClientMessage(playerid, COLOR, "");
SendClientLangMessage(playerid, 0xffffffff, "[{c4c4c4}INFO{ffffff}] {ffffff}/unmute [ID Gracza]", "[{c4c4c4}INFO{ffffff}] {ffffff}/unmute [Player ID]");
format(strPOL, sizeof(strPOL), "[{CC0000}UNMUTE{ffffff}] {CC0000}%s {ffffff}zosta? odciszony przez Admina {CC0000}%s", PlayerName(id), PlayerName(playerid));
format(strENG, sizeof(strENG), "[{CC0000}UNMUTE{ffffff}] {CC0000}%s {ffffff}has been unmuted by Admin {CC0000}%s", PlayerName(id), PlayerName(playerid));
SendClientLangMessageToAll(0xffffffff,strPOL, strENG);
format(strPOL, sizeof(strPOL), "[{CC0000}UNMUTE{ffffff}] {CC0000}Zosta?es odciszony przez Admina {ffffff}%s", PlayerName(playerid));
format(strENG, sizeof(strENG), "[{CC0000}UNMUTE{ffffff}] {CC0000}You have been unmuted by Admin {ffffff}%s", PlayerName(playerid));
SendClientLangMessage(id, 0xffffffff,strPOL, strENG);
DeletePVar(id,"Muted");
return 1;
}
Prosi?bym tylko o to, aby kto? zamieni? mi to na "strcmp". To wszystko.
Wysłany: 2012-11-23, 18:02
ToxiC.
Wiek: 28 Na forum: 5246 dni Posty: 3792
Piwa : 8590
Daj to w publicku: OnPlayerCommandText:
Kod:
if(strcmp(cmd, "/mute", true))
{
new id,time,reason[100],str[128];
if(!IsPlayerAdmin(playerid) || IsRangs(playerid, 2))
return SendClientLangMessage(playerid, 0xffffffff, "Nie jeste? Adminem!", "You are not an Admin!");
if(sscanf(params,"dds",id,time,reason))
return SendClientLangMessage(playerid, 0xffffffff, "[{c4c4c4}INFO{ffffff}] {ffffff} /mute [ID Gracza] [czas] [pow?d]", "[{c4c4c4}INFO{ffffff}] {ffffff} /mute [playerid] [time] [reason]");
SetPVarInt(id,"Muted", gettime() + (time*60) );
GetPlayerName(id,str,MAX_PLAYER_NAME);
format(strPOL, sizeof(strPOL), "[{CC0000}MUTE{ffffff}] {CC0000}%s {ffffff}zosta? wyciszony przez Admina {CC0000}%s {ffffff}[{CC0000}%s{ffffff}] [{CC0000}%d{ffffff}]", PlayerName(id), PlayerName(playerid), reason, xGetTimeString( GetPVarInt(id,"Muted")));
format(strENG, sizeof(strENG), "[{CC0000}MUTE{ffffff}] {CC0000}%s {ffffff}has been muted by Admin {CC0000}%s {ffffff}[{CC0000}%s{ffffff}] [{CC0000}%d{ffffff}]", PlayerName(id), PlayerName(playerid), reason, xGetTimeString( GetPVarInt(id,"Muted")));
SendClientLangMessageToAll(0xffffffff,strPOL, strENG);
format(strPOL, sizeof(strPOL), "[{CC0000}MUTE{ffffff}] {CC0000}Zosta?es wyciszony przez Admina {ffffff}%s [{CC0000}%s{ffffff}] [{CC0000}%d{ffffff}]", PlayerName(playerid), reason, xGetTimeString( GetPVarInt(id,"Muted")));
format(strENG, sizeof(strENG), "[{CC0000}MUTE{ffffff}] {CC0000}You have been muted by Admin {ffffff}%s [{CC0000}%s{ffffff}] [{CC0000}%d{ffffff}]", PlayerName(playerid), reason, xGetTimeString( GetPVarInt(id,"Muted")));
SendClientLangMessage(id, 0xffffffff,strPOL, strENG);
return 1;
}
CMD:unmute(playerid,params[])
{
new id;
if(!IsPlayerAdmin(playerid) || IsRangs(playerid, 2))
return SendClientLangMessage(playerid, 0xffffffff, "[{c4c4c4}INFO{ffffff}] {ffffff}Nie jeste? Adminem!", "[{c4c4c4}INFO{ffffff}] {ffffff}You are not an Admin");
if(sscanf(params,"d",id))
return SendClientMessage(playerid, COLOR, "");
SendClientLangMessage(playerid, 0xffffffff, "[{c4c4c4}INFO{ffffff}] {ffffff}/unmute [ID Gracza]", "[{c4c4c4}INFO{ffffff}] {ffffff}/unmute [Player ID]");
format(strPOL, sizeof(strPOL), "[{CC0000}UNMUTE{ffffff}] {CC0000}%s {ffffff}zosta? odciszony przez Admina {CC0000}%s", PlayerName(id), PlayerName(playerid));
format(strENG, sizeof(strENG), "[{CC0000}UNMUTE{ffffff}] {CC0000}%s {ffffff}has been unmuted by Admin {CC0000}%s", PlayerName(id), PlayerName(playerid));
SendClientLangMessageToAll(0xffffffff,strPOL, strENG);
format(strPOL, sizeof(strPOL), "[{CC0000}UNMUTE{ffffff}] {CC0000}Zosta?es odciszony przez Admina {ffffff}%s", PlayerName(playerid));
format(strENG, sizeof(strENG), "[{CC0000}UNMUTE{ffffff}] {CC0000}You have been unmuted by Admin {ffffff}%s", PlayerName(playerid));
SendClientLangMessage(id, 0xffffffff,strPOL, strENG);
DeletePVar(id,"Muted");
return 1;
}
Wysłany: 2012-11-23, 18:09
sojcef
Wiek: 36 Na forum: 5059 dni Posty: 30
a druga cmd?? i wyskakuje mi b??d "undefined symbol "params"
Wysłany: 2012-11-23, 18:17
VisztaPL
Producent Muzyczny
Wiek: 29 Na forum: 5175 dni Posty: 57
Nick w MP: VisztaPL
Piwa : 461
Kod: if(strcmp(cmd, "/unmute", true))
{
new id;
if(!IsPlayerAdmin(playerid) || IsRangs(playerid, 2))
return SendClientLangMessage(playerid, 0xffffffff, "[{c4c4c4}INFO{ffffff}] {ffffff}Nie jeste? Adminem!", "[{c4c4c4}INFO{ffffff}] {ffffff}You are not an Admin");
if(sscanf(params,"d",id))
return SendClientMessage(playerid, COLOR, "");
SendClientLangMessage(playerid, 0xffffffff, "[{c4c4c4}INFO{ffffff}] {ffffff}/unmute [ID Gracza]", "[{c4c4c4}INFO{ffffff}] {ffffff}/unmute [Player ID]");
format(strPOL, sizeof(strPOL), "[{CC0000}UNMUTE{ffffff}] {CC0000}%s {ffffff}zosta? odciszony przez Admina {CC0000}%s", PlayerName(id), PlayerName(playerid));
format(strENG, sizeof(strENG), "[{CC0000}UNMUTE{ffffff}] {CC0000}%s {ffffff}has been unmuted by Admin {CC0000}%s", PlayerName(id), PlayerName(playerid));
SendClientLangMessageToAll(0xffffffff,strPOL, strENG);
format(strPOL, sizeof(strPOL), "[{CC0000}UNMUTE{ffffff}] {CC0000}Zosta?es odciszony przez Admina {ffffff}%s", PlayerName(playerid));
format(strENG, sizeof(strENG), "[{CC0000}UNMUTE{ffffff}] {CC0000}You have been unmuted by Admin {ffffff}%s", PlayerName(playerid));
SendClientLangMessage(id, 0xffffffff,strPOL, strENG);
DeletePVar(id,"Muted");
return 1;
}
Wysłany: 2012-11-23, 18:31
sojcef
Wiek: 36 Na forum: 5059 dni Posty: 30
wyskakuje mi b??d "undefined symbol "params"
Wysłany: 2012-11-23, 19:17
VisztaPL
Producent Muzyczny
Wiek: 29 Na forum: 5175 dni Posty: 57
Nick w MP: VisztaPL
Piwa : 461
Nie ma takiej tablicy.
Mejbi: 'cmdtext' zamiast 'params'.
Wysłany: 2012-11-24, 14:42
adrian_pl_20
Wiek: 31 Na forum: 6683 dni Posty: 155
Nick w MP: adrian_w
Piwa : 1568
w obu komendach zamiast Kod: ma by? Kod:
Tagi: zcmd :: strcmp
Anonymous
Na forum: 245 dni
Posty: 1
Anonymous Koniecznie zajrzyj na: