29.10.2012, 16:24
Can somebody translate this strcmd command to zcmd ty!
Код:
if(strcmp(cmd, "/makeleader", true) == 0) { if(IsPlayerConnected(playerid)) { tmp = strtok(cmdtext, idx); if(!strlen(tmp)) { SendClientMessage(playerid, COLOR_GRAD2, "Koristi: /makeleader [ID Igraca/Deo Imena] [Broj(1-17)]"); SendClientMessage(playerid, LIGHTRED, "|___________________________________________________________________|"); SendClientMessage(playerid, 0x33CCFFAA, "| 1.PD | 2.BIA | 3.Vojska | 4.MD | 5.Yakuza | 6.LCN | 7.Vlada |"); SendClientMessage(playerid, 0x33CCFFAA, "| 8.Hitman | 9.GGN | 10.Taxi | 12.Ballas | 13.Surenos | 14.Bajkeri |"); SendClientMessage(playerid, 0x33CCFFAA, "| 15.GSF | 16.MS13 | 17.RM | 18.PS | 19.PO 1 | 20.PO 2 |"); SendClientMessage(playerid, LIGHTRED, "|___________________________________________________________________|"); return 1; } new para1; new level; para1 = ReturnUser(tmp); tmp = strtok(cmdtext, idx); level = strval(tmp); if(level > 20 || level < 0) { SendClientMessage(playerid, COLOR_GREY, "Nemojte ispod 0, ili preko 20!"); return 1; } if (PlayerInfo[playerid][pAdmin] >= 1337) { if(IsPlayerConnected(para1)) { if(para1 != INVALID_PLAYER_ID) { /*if(PlayerInfo[para1][pMember] > 0 || PlayerInfo[para1][pFMember] < 255) { SendClientMessage(playerid, COLOR_GREY, "Taj igrac je clan neke organizacije!"); return 1; }*/ GetPlayerName(para1, giveplayer, sizeof(giveplayer)); GetPlayerName(playerid, sendername, sizeof(sendername)); PlayerInfo[para1][pLeader] = level; format(string, sizeof(string), "* Promovisani ste za lidera zbog vaseg zahteva od strane admina %s", sendername); SendClientMessage(para1, COLOR_WHITE, string); format(string, sizeof(string), "Dali ste igracu %s da bira Faction broj %d.", giveplayer,level); SendClientMessage(playerid, COLOR_WHITE, string); if(level == 0) { PlayerInfo[para1][pChar] = 26; SetPlayerSkin(para1, 26); PlayerInfo[para1][pRank] = 0; gTeam[para1] = 3; PlayerInfo[para1][pTeam] = 0; return 1; } else if(level == 1) { PlayerInfo[para1][pChar] = 288; } //LS PD else if(level == 2) { PlayerInfo[para1][pChar] = 286; } //BIA else if(level == 3) { PlayerInfo[para1][pChar] = 287; } //Vojska else if(level == 4) { PlayerInfo[para1][pChar] = 70; } //MD else if(level == 5) { PlayerInfo[para1][pChar] = 228; } //Yakuza else if(level == 6) { PlayerInfo[para1][pChar] = 165; } //LCN else if(level == 7) { PlayerInfo[para1][pChar] = 147; } //gradonacelnik else if(level == 8) { PlayerInfo[para1][pChar] = 33; } //Hitman else if(level == 9) { PlayerInfo[para1][pChar] = 295; } //GGN else if(level == 10) { PlayerInfo[para1][pChar] = 61; } //Taxi Cab Company else if(level == 12) { PlayerInfo[para1][pChar] = 296; } //Ballas else if(level == 13) { PlayerInfo[para1][pChar] = 116; } //Surenos else if(level == 14) { PlayerInfo[para1][pChar] = 100; } //Bikeri else if(level == 15) { PlayerInfo[para1][pChar] = 271; } //GSfly else if(level == 16) { PlayerInfo[para1][pChar] = 110; } //MS13 else if(level == 17) { PlayerInfo[para1][pChar] = 113; } //RM else if(level == 18) { PlayerInfo[para1][pChar] = 16; } //PS else if(level == 19) { PlayerInfo[para1][pChar] = 98; } //PO 1 else if(level == 20) { PlayerInfo[para1][pChar] = 46; } //PO 2 if(level == 0) { gTeam[para1] = 3; PlayerInfo[para1][pTeam] = 3; PlayerInfo[para1][pChar] = 6; } else if(level == 1 || level == 2 || level == 3) { gTeam[para1] = 2; PlayerInfo[para1][pTeam] = 2; } else if(level == 4) { gTeam[para1] = 1; PlayerInfo[para1][pTeam] = 1; } else { gTeam[para1] = 15; PlayerInfo[para1][pTeam] = 15; } if(level == 0) { PlayerInfo[para1][pRank] = 0; } else { PlayerInfo[para1][pRank] = 6; } SetPlayerSkin(para1, PlayerInfo[para1][pChar]); SacuvajIgraca(para1); } }//not connected } else { SendClientMessage(playerid, WHITE, ""COL_RED"|GlobalGaming|{FFFFFF} Niste ovlasteni da koristite tu komandu."); } } return 1; }