Zaloguj się by uzyskać pełen dostęp. Nie masz jeszcze konta? Założ je już teraz w kilka sekund.

Wysłany: 2012-11-23, 17:17


sojcef







Wiek: 36
Na forum: 5058 dni
Posty: 30



Respekt: 50

Ostrzeżeń: 20%
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.

Postaw piwo autorowi tego posta
 

 
Wysłany: 2012-11-23, 18:02


ToxiC.







Wiek: 28
Na forum: 5246 dni
Posty: 3792

Piwa: 8590

Respekt: 1143,8
Respekt: 1143,8

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;
}


Postaw piwo autorowi tego posta
 

 
Wysłany: 2012-11-23, 18:09


sojcef







Wiek: 36
Na forum: 5058 dni
Posty: 30



Respekt: 50

Ostrzeżeń: 20%
a druga cmd?? i wyskakuje mi b??d "undefined symbol "params"

Postaw piwo autorowi tego posta
 

 
Wysłany: 2012-11-23, 18:17


VisztaPL

Producent Muzyczny






Wiek: 29
Na forum: 5174 dni
Posty: 57
Nick w MP: VisztaPL

Piwa: 461

Respekt: 83,6

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;
}


Postaw piwo autorowi tego posta
 

 
Wysłany: 2012-11-23, 18:31


sojcef







Wiek: 36
Na forum: 5058 dni
Posty: 30



Respekt: 50

Ostrzeżeń: 20%
wyskakuje mi b??d "undefined symbol "params"

Postaw piwo autorowi tego posta
 

 
Wysłany: 2012-11-23, 19:17


VisztaPL

Producent Muzyczny






Wiek: 29
Na forum: 5174 dni
Posty: 57
Nick w MP: VisztaPL

Piwa: 461

Respekt: 83,6

Nie ma takiej tablicy.

Mejbi: 'cmdtext' zamiast 'params'.

Postaw piwo autorowi tego posta
 

 
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

Respekt: 111
Respekt: 111

w obu komendach zamiast
Kod:

if(sscanf(params,
ma by?
Kod:

if(sscanf(cmd,


Podpis
Oglądaj filmy i seriale online za darmo, bez reklam i limitów

http://maxkino.tv
Postaw piwo autorowi tego posta
 

 
Tagi: zcmd :: strcmp
Anonymous





Na forum: 245 dni
Posty: 1



Anonymous Koniecznie zajrzyj na:






Skocz do:  
Wyświetl posty z ostatnich:   
GTAONLINE.PL » JĘZYKI PROGRAMOWANIA » PAWN Ten temat jest zablokowany bez możliwości zmiany postów lub pisania odpowiedzi

Nie możesz pisać nowych tematów
Nie możesz odpowiadać w tematach
Nie możesz zmieniać swoich postów
Nie możesz usuwać swoich postów
Nie możesz głosować w ankietach
Dodaj temat do Ulubionych
Wersja do druku