02.04.2009, 21:34
How i can repair my command /makeleader? I download new gamemode and that command doesn't work . But befour that command worked!
//----------------------------------[MAKELEADER]------------------------------------------------ if(strcmp(cmd, "/makeleader", true) == 0) { if(IsPlayerConnected(playerid)) { tmp = strtok(cmdtext, idx); if(!strlen(tmp)) { SendClientMessage(playerid, COLOR_GRAD2, "Kullanım: /makeleader [OyuncuID] [Number(1-10)]"); return 1; } new para1; new level; para1 = ReturnUser(tmp); tmp = strtok(cmdtext, idx); level = strval(tmp); if(level > 14 || level < 0) { SendClientMessage(playerid, COLOR_GREY, "0 - 14 Arası Faction Seзeneğiniz Vardır!"); return 1; } if (PlayerInfo[playerid][pAdmin] >= 4) { if(IsPlayerConnected(para1)) { if(para1 != INVALID_PLAYER_ID) { if(PlayerInfo[para1][pMember] > 0 || PlayerInfo[para1][pFMember] < 255) { SendClientMessage(playerid, COLOR_GREY, "Oyuncu Bir Organizasyon Ьyesi!"); return 1; } GetPlayerName(para1, giveplayer, sizeof(giveplayer)); GetPlayerName(playerid, sendername, sizeof(sendername)); PlayerInfo[para1][pLeader] = level; format(string, sizeof(string), "Admin %s Tarafından Bir Factiona Atandın.", sendername); SendClientMessage(para1, COLOR_WHITE, string); format(string, sizeof(string), " %s Adlı Kişiyi %d Numaralı Factiona Atadın.", giveplayer,level); SendClientMessage(playerid, COLOR_WHITE, string); if(level == 0) { PlayerInfo[para1][pChar] = 0; PlayerInfo[para1][pRank] = 0; gTeam[para1] = 3; PlayerInfo[para1][pTeam] = 0; return 1; } else if(level == 1) { PlayerInfo[para1][pChar] = 288; } //SFPD else if(level == 2) { PlayerInfo[para1][pChar] = 286; } //FBI else if(level == 3) { PlayerInfo[para1][pChar] = 28; } //TJ else if(level == 4) { PlayerInfo[para1][pChar] = 68; } //SFMD else if(level == 5) { PlayerInfo[para1][pChar] = 186; } //Rashumaci else if(level == 6) { PlayerInfo[para1][pChar] = 120; } //Corleone else if(level == 7) { PlayerInfo[para1][pChar] = 228; } //Başbakan else if(level == 8) { PlayerInfo[para1][pChar] = 118; } //Hitman else if(level == 9) { PlayerInfo[para1][pChar] = 258; } //San Tv else if(level == 10) { PlayerInfo[para1][pChar] = 61; } //Taksi else if(level == 11) { PlayerInfo[para1][pChar] = 187; } //Sьrьcь Okulu else if(level == 12) { PlayerInfo[para1][pChar] = 295; } //Cuneo else if(level == 13) { PlayerInfo[para1][pChar] = 147; } // Mahkeme else if(level == 14) { PlayerInfo[para1][pChar] = 104; } // Marcetti Giyim if(level == 0) { gTeam[para1] = 3; PlayerInfo[para1][pTeam] = 3; } 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; } SetPlayerSkin(para1, PlayerInfo[para1][pChar]); if(level == 0) { PlayerInfo[para1][pRank] = 0; } else { PlayerInfo[para1][pRank] = 9; } } }//not connected } else { SendClientMessage(playerid, COLOR_GRAD1, "[!]Bu Komutu Kullanmak İзin Yetkiniz Yok"); } } return 1; }
Originally Posted by grimbluelord
Код:
//----------------------------------[MAKELEADER]------------------------------------------------ if(strcmp(cmd, "/makeleader", true) == 0) { if(IsPlayerConnected(playerid)) { tmp = strtok(cmdtext, idx); if(!strlen(tmp)) { SendClientMessage(playerid, COLOR_GRAD2, "Kullanım: /makeleader [OyuncuID] [Number(1-10)]"); return 1; } new para1; new level; para1 = ReturnUser(tmp); tmp = strtok(cmdtext, idx); level = strval(tmp); if(level > 14 || level < 0) { SendClientMessage(playerid, COLOR_GREY, "0 - 14 Arası Faction Seзeneğiniz Vardır!"); return 1; } if (PlayerInfo[playerid][pAdmin] >= 4) { if(IsPlayerConnected(para1)) { if(para1 != INVALID_PLAYER_ID) { if(PlayerInfo[para1][pMember] > 0 || PlayerInfo[para1][pFMember] < 255) { SendClientMessage(playerid, COLOR_GREY, "Oyuncu Bir Organizasyon Ьyesi!"); return 1; } GetPlayerName(para1, giveplayer, sizeof(giveplayer)); GetPlayerName(playerid, sendername, sizeof(sendername)); PlayerInfo[para1][pLeader] = level; format(string, sizeof(string), "Admin %s Tarafından Bir Factiona Atandın.", sendername); SendClientMessage(para1, COLOR_WHITE, string); format(string, sizeof(string), " %s Adlı Kişiyi %d Numaralı Factiona Atadın.", giveplayer,level); SendClientMessage(playerid, COLOR_WHITE, string); if(level == 0) { PlayerInfo[para1][pChar] = 0; PlayerInfo[para1][pRank] = 0; gTeam[para1] = 3; PlayerInfo[para1][pTeam] = 0; return 1; } else if(level == 1) { PlayerInfo[para1][pChar] = 288; } //SFPD else if(level == 2) { PlayerInfo[para1][pChar] = 286; } //FBI else if(level == 3) { PlayerInfo[para1][pChar] = 28; } //TJ else if(level == 4) { PlayerInfo[para1][pChar] = 68; } //SFMD else if(level == 5) { PlayerInfo[para1][pChar] = 186; } //Rashumaci else if(level == 6) { PlayerInfo[para1][pChar] = 120; } //Corleone else if(level == 7) { PlayerInfo[para1][pChar] = 228; } //Başbakan else if(level == 8) { PlayerInfo[para1][pChar] = 118; } //Hitman else if(level == 9) { PlayerInfo[para1][pChar] = 258; } //San Tv else if(level == 10) { PlayerInfo[para1][pChar] = 61; } //Taksi else if(level == 11) { PlayerInfo[para1][pChar] = 187; } //Sьrьcь Okulu else if(level == 12) { PlayerInfo[para1][pChar] = 295; } //Cuneo else if(level == 13) { PlayerInfo[para1][pChar] = 147; } // Mahkeme else if(level == 14) { PlayerInfo[para1][pChar] = 104; } // Marcetti Giyim if(level == 0) { gTeam[para1] = 3; PlayerInfo[para1][pTeam] = 3; } 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; } SetPlayerSkin(para1, PlayerInfo[para1][pChar]); if(level == 0) { PlayerInfo[para1][pRank] = 0; } else { PlayerInfo[para1][pRank] = 9; } } }//not connected } else { SendClientMessage(playerid, COLOR_GRAD1, "[!]Bu Komutu Kullanmak İзin Yetkiniz Yok"); } } return 1; } |
Originally Posted by grimbluelord
Код:
//----------------------------------[MAKELEADER]------------------------------------------------ if(strcmp(cmd, "/makeleader", true) == 0) { if(IsPlayerConnected(playerid)) { tmp = strtok(cmdtext, idx); if(!strlen(tmp)) { SendClientMessage(playerid, COLOR_GRAD2, "Kullanım: /makeleader [OyuncuID] [Number(1-10)]"); return 1; } new para1; new level; para1 = ReturnUser(tmp); tmp = strtok(cmdtext, idx); level = strval(tmp); if(level > 14 || level < 0) { SendClientMessage(playerid, COLOR_GREY, "0 - 14 Arası Faction Seзeneğiniz Vardır!"); return 1; } if (PlayerInfo[playerid][pAdmin] >= 4) { if(IsPlayerConnected(para1)) { if(para1 != INVALID_PLAYER_ID) { if(PlayerInfo[para1][pMember] > 0 || PlayerInfo[para1][pFMember] < 255) { SendClientMessage(playerid, COLOR_GREY, "Oyuncu Bir Organizasyon Ьyesi!"); return 1; } GetPlayerName(para1, giveplayer, sizeof(giveplayer)); GetPlayerName(playerid, sendername, sizeof(sendername)); PlayerInfo[para1][pLeader] = level; format(string, sizeof(string), "Admin %s Tarafından Bir Factiona Atandın.", sendername); SendClientMessage(para1, COLOR_WHITE, string); format(string, sizeof(string), " %s Adlı Kişiyi %d Numaralı Factiona Atadın.", giveplayer,level); SendClientMessage(playerid, COLOR_WHITE, string); if(level == 0) { PlayerInfo[para1][pChar] = 0; PlayerInfo[para1][pRank] = 0; gTeam[para1] = 3; PlayerInfo[para1][pTeam] = 0; return 1; } else if(level == 1) { PlayerInfo[para1][pChar] = 288; } //SFPD else if(level == 2) { PlayerInfo[para1][pChar] = 286; } //FBI else if(level == 3) { PlayerInfo[para1][pChar] = 28; } //TJ else if(level == 4) { PlayerInfo[para1][pChar] = 68; } //SFMD else if(level == 5) { PlayerInfo[para1][pChar] = 186; } //Rashumaci else if(level == 6) { PlayerInfo[para1][pChar] = 120; } //Corleone else if(level == 7) { PlayerInfo[para1][pChar] = 228; } //Başbakan else if(level == 8) { PlayerInfo[para1][pChar] = 118; } //Hitman else if(level == 9) { PlayerInfo[para1][pChar] = 258; } //San Tv else if(level == 10) { PlayerInfo[para1][pChar] = 61; } //Taksi else if(level == 11) { PlayerInfo[para1][pChar] = 187; } //Sьrьcь Okulu else if(level == 12) { PlayerInfo[para1][pChar] = 295; } //Cuneo else if(level == 13) { PlayerInfo[para1][pChar] = 147; } // Mahkeme else if(level == 14) { PlayerInfo[para1][pChar] = 104; } // Marcetti Giyim if(level == 0) { gTeam[para1] = 3; PlayerInfo[para1][pTeam] = 3; } 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; } SetPlayerSkin(para1, PlayerInfo[para1][pChar]); if(level == 0) { PlayerInfo[para1][pRank] = 0; } else { PlayerInfo[para1][pRank] = 9; } } }//not connected } else { SendClientMessage(playerid, COLOR_GRAD1, "[!]Bu Komutu Kullanmak İзin Yetkiniz Yok"); } } return 1; } |