07.08.2012, 14:08
I need the command /accept invite
when some one /invite you
you type /accept invite to ACCEPT THE INVITE
when some one /invite you
you type /accept invite to ACCEPT THE INVITE
if(strcmp(cmd, "/invite", true) == 0) { if(IsPlayerConnected(playerid)) { tmp = strtok(cmdtext, idx); if(!strlen(tmp)) { SendClientMessage(playerid, COLOR_GRAD2, "{37F906}INFO:{FFFFFF}/invite [ID/Ime na Igrac]"); return 1; } new para1; new ftext[20]; para1 = ReturnUser(tmp); if (PlayerInfo[playerid][pLeader] >= 1) { if(IsPlayerConnected(para1)) { if(para1 != INVALID_PLAYER_ID) { if (ProxDetectorS(5.0, playerid, giveplayerid)) { if(PlayerInfo[playerid][pLeader] == 1) { PlayerInfo[para1][pTeam] = 2; gTeam[para1] = 2; ftext = "PD"; ChosenSkin[para1] = 280; SetPlayerSkin(para1, 280); } else if(PlayerInfo[playerid][pLeader] == 2) { PlayerInfo[para1][pTeam] = 2; gTeam[para1] = 2; ftext = "FBI"; ChosenSkin[para1] = 24; SetPlayerSkin(para1, 24); } else if(PlayerInfo[playerid][pLeader] == 3) { PlayerInfo[para1][pTeam] = 1; gTeam[para1] = 1; ftext = "SWAT"; ChosenSkin[para1] = 285; SetPlayerSkin(para1, 285); } else if(PlayerInfo[playerid][pLeader] == 4) { PlayerInfo[para1][pTeam] = 5; gTeam[para1] = 5; ftext = "MD"; ChosenSkin[para1] = 71; SetPlayerSkin(para1, 71); } else if(PlayerInfo[playerid][pLeader] == 5) { PlayerInfo[para1][pTeam] = 6; gTeam[para1] = 6; ftext = "Yakuza"; ChosenSkin[para1] = 121; SetPlayerSkin(para1, 121); } else if(PlayerInfo[playerid][pLeader] == 6) { PlayerInfo[para1][pTeam] = 7; gTeam[para1] = 7; ftext = "LCN"; ChosenSkin[para1] = 111; SetPlayerSkin(para1, 111); } else if(PlayerInfo[playerid][pLeader] == 7) { PlayerInfo[para1][pTeam] = 12; gTeam[para1] = 12; ftext = "Vlada"; ChosenSkin[para1] = 163; SetPlayerSkin(para1, 163); } else if(PlayerInfo[playerid][pLeader] == { PlayerInfo[para1][pTeam] = 12; gTeam[para1] = 12; ftext = "Hitman"; ChosenSkin[para1] = 20; SetPlayerSkin(para1, 20); } else if(PlayerInfo[playerid][pLeader] == 9) { PlayerInfo[para1][pTeam] = 12; gTeam[para1] = 12; ftext = "Beyond News"; ChosenSkin[para1] = 171; SetPlayerSkin(para1, 171); } else if(PlayerInfo[playerid][pLeader] == 10) { PlayerInfo[para1][pTeam] = 15; gTeam[para1] = 15; ftext = "Taxi"; ChosenSkin[para1] = 210; SetPlayerSkin(para1, 210); } else if(PlayerInfo[playerid][pLeader] == 11) { PlayerInfo[para1][pTeam] = 16; gTeam[para1] = 16; ftext = "LSG"; ChosenSkin[para1] = 175; SetPlayerSkin(para1, 175); } else if(PlayerInfo[playerid][pLeader] == 12) { PlayerInfo[para1][pTeam] = 16; gTeam[para1] = 16; ftext = "GSF"; ChosenSkin[para1] = 105; SetPlayerSkin(para1, 105); } else { return 1; } GetPlayerName(para1, giveplayer, sizeof(giveplayer)); GetPlayerName(playerid, sendername, sizeof(sendername)); PlayerInfo[para1][pMember] = PlayerInfo[playerid][pLeader]; PlayerInfo[para1][pRank] = 1; printf("AdmCmd: %s go povika %s da se pridruzi %s.", sendername, giveplayer, ftext); format(string, sizeof(string), "{37F906}INFO:{FFFFFF}Povikani ste vo %s, od Lider %s", ftext, sendername); SendClientMessage(para1, COLOR_WHITE, string); format(string, sizeof(string), "{37F906}INFO:{FFFFFF}Go Primavte %s, vo %s.", giveplayer,ftext); SCM(playerid, BELA, string); } else { SCM(playerid, BELA,"{FF4040}GRESKA:{FFFFFF}Igracot e Daleku."); } } } } else { SendClientMessage(playerid, COLOR_GRAD1, "{FF4040}GRESKA:{FFFFFF}Ne ste Ovlasteni za ovaa Komanda."); } } return 1; } |