04.05.2011, 17:02
Any way to change this to zcmd?
Код:
if(strcmp(cmd,"/name",true)==0){ if(PlayerInfo[playerid][power]>0 || PlayerInfo[playerid][premium]>0 || PlayerInfo[playerid][playerteam]==HITMAN || PlayerInfo[playerid][playerlvl]>=20){ new tmp[256]; tmp=strtok(cmdtext,idx); if(!strlen(tmp)){ SendClientUsage(playerid, cmd, "[on/off]"); return 1; } if(strcmp(tmp,"on",true)==0){ PlayerTemp[playerid][hname]=0; GameTextForPlayer(playerid,"~g~ShowName ON",1000,1); for(new i=0;i<MAX_PLAYERS;i++) if(IsPlayerConnected(i)) ShowPlayerNameTagForPlayer(i,playerid,1); return 1; } if(strcmp(tmp,"off",true)==0){ PlayerTemp[playerid][hname]=1; GameTextForPlayer(playerid,"~r~ShowName OFF",1000,1); for(new i=0;i<MAX_PLAYERS;i++) if(IsPlayerConnected(i) && PlayerInfo[i][power]==0) ShowPlayerNameTagForPlayer(i,playerid,0); return 1; } } else{ SendClientError(playerid,"You can't use this command for now"); return 1; } }
Код:
if(strcmp(cmd,"/irc",true)==0){ if(PlayerTemp[playerid][muted]==0){ if(ircenable==1){ new tmp[256]; new message[MAX_STRING]; tmp = strrest(cmdtext,idx); if(!strlen(tmp)){ SendClientUsage(playerid, cmd, "[message]"); return 1; } format(message,sizeof(message),"[(ToIRC) %s[%d]: %s]",PlayerName(playerid),playerid,tmp); SendClientMessage(playerid,COLOR_ADMIN_SPYREPORT,message); for(new i=0;i<MAX_PLAYERS;i++){ if(PlayerInfo[i][power]>0 || PlayerInfo[i][helper]>0) SendClientMessage(i, COLOR_ADMIN_SPYREPORT, message); } format(message, sizeof(message), "05(ToIRC) %s[%d]: %s]", PlayerName(playerid), playerid, tmp); IRC_GroupSay(gGroupID, IRC_CHANNEL, message); //ircecho("irctalk %d %s %s",playerid,PlayerName(playerid),tmp); return 1; } else{ SendClientError(playerid,"IRC CHAT DISABLED"); return 1; } } else{ SendClientError(playerid,"You have been muted"); return 1; }
Код:
if(strcmp(cmd,"/jq",true)==0){ new tmp[256]; tmp=strtok(cmdtext,idx); if(!strlen(tmp)){ SendClientUsage(playerid, cmd, "[on/off]"); return 1; } if(strcmp(tmp,"on",true)==0){ PlayerTemp[playerid][jqmessage]=1; InfoText(playerid,"join/quit messages turned on",5); return 1; } if(strcmp(tmp,"off",true)==0){ PlayerTemp[playerid][jqmessage]=0; InfoText(playerid,"join/quit messages turned off",5); return 1; } }