27.07.2008, 23:21
hello,
The leader can invite, but i want also with the rank 5.
I have that.
Thanks
The leader can invite, but i want also with the rank 5.
I have that.
Код:
if(strcmp(cmd, "/invite", true) == 0) { if(IsPlayerConnected(playerid)) { tmp = strtok(cmdtext, idx); if(!strlen(tmp)) { SendClientMessage(playerid, COLOR_GRAD2, "USAGE: /invite [playerid/PartOfName]"); return 1; } new para1; new ftext[20]; para1 = ReturnUser(tmp); if (PlayerInfo[playerid][pLeader] >= 1) { if(IsPlayerConnected(para1)) { if(para1 != INVALID_PLAYER_ID) { if (gTeam[para1]==TEAM_GREEN && PlayerInfo[para1][pMember] == 0) { GetPlayerName(para1, giveplayer, sizeof(giveplayer)); GetPlayerName(playerid, sendername, sizeof(sendername)); if(PlayerInfo[playerid][pLeader] == 1) { PlayerInfo[para1][pTeam] = 2; gTeam[para1] = 2; ftext = "Police"; ChosenSkin[para1] = 267; SetPlayerSkin(para1, 267); } else if(PlayerInfo[playerid][pLeader] == 2) { PlayerInfo[para1][pTeam] = 2; gTeam[para1] = 2; ftext = "FBI/ATF"; ChosenSkin[para1] = 286; SetPlayerSkin(para1, 286); } else if(PlayerInfo[playerid][pLeader] == 3) { PlayerInfo[para1][pTeam] = 2; gTeam[para1] = 2; ftext = "The Company"; ChosenSkin[para1] = 234; SetPlayerSkin(para1, 234); } else if(PlayerInfo[playerid][pLeader] == 4) { PlayerInfo[para1][pTeam] = 1; gTeam[para1] = 1; ftext = "Firemen/Ambulance"; ChosenSkin[para1] = 70; SetPlayerSkin(para1, 70); } else if(PlayerInfo[playerid][pLeader] == 5) { PlayerInfo[para1][pTeam] = 5; gTeam[para1] = 5; ftext = "Grove Street"; ChosenSkin[para1] = 7; SetPlayerSkin(para1, 7);} else if(PlayerInfo[playerid][pLeader] == 10) { PlayerInfo[para1][pTeam] = 12; gTeam[para1] = 12; ftext = "SAPT"; ChosenSkin[para1] = 255; SetPlayerSkin(para1, 255); } else if(PlayerInfo[playerid][pLeader] == 11) { PlayerInfo[para1][pTeam] = 12; gTeam[para1] = 12; ftext = "School Instructors"; ChosenSkin[para1] = 59; SetPlayerSkin(para1, 59); } else if(PlayerInfo[playerid][pLeader] == 12) { PlayerInfo[para1][pTeam] = 12; gTeam[para1] = 12; ftext = "Nucci Familia"; ChosenSkin[para1] = 122; SetPlayerSkin(para1, 122);} else if(PlayerInfo[playerid][pLeader] == 17) { PlayerInfo[para1][pTeam] = 12; gTeam[para1] = 12; ftext = "Vercetti Familia"; ChosenSkin[para1] = 184; SetPlayerSkin(para1, 184);} else { return 1; } GetPlayerName(para1, giveplayer, sizeof(giveplayer)); GetPlayerName(playerid, sendername, sizeof(sendername)); gTeam[playerid] = PlayerInfo[playerid][pTeam]; MedicBill[playerid] = 0; MedicBill[para1] = 0; PlayerInfo[para1][pMember] = PlayerInfo[playerid][pLeader]; PlayerInfo[para1][pRank] = 1; SetPlayerSpawn(para1); printf("AdmCmd: %s has invited %s to join %s.", sendername, giveplayer, ftext); format(string, sizeof(string), "Org/Team: %s has invited %s ", ftext, sendername); SendClientMessage(para1, COLOR_LIGHTBLUE, string); PlayerInfo[para1][pModel] = ChosenSkin[para1]; } else { SendClientMessage(playerid, COLOR_GREY, "wanted"); return 1; } } } } else { SendClientMessage(playerid, COLOR_GRAD1, "You are not authorized to use that command (leaders only)!"); } } return 1; }