Help how to make this
#1

i have this /invite

Код:
	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(PlayerInfo[playerid][pLeader] == 1) { PlayerInfo[para1][pTeam] = 2; gTeam[para1] = 2; ftext = "Police Department"; ChosenSkin[para1] = 282; SetPlayerSkin(para1, 282); }
					        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] = 2; gTeam[para1] = 2; ftext = "ARM"; ChosenSkin[para1] = 285; SetPlayerSkin(para1, 285); }
					        else if(PlayerInfo[playerid][pLeader] == 4) { PlayerInfo[para1][pTeam] = 1; gTeam[para1] = 1; ftext = "Ambulance"; ChosenSkin[para1] = 276; SetPlayerSkin(para1, 276); }
					        else if(PlayerInfo[playerid][pLeader] == 5) { PlayerInfo[para1][pTeam] = 5; gTeam[para1] = 5; ftext = "La Cosa Nostra"; ChosenSkin[para1] = 125; SetPlayerSkin(para1, 125); }
					        else if(PlayerInfo[playerid][pLeader] == 6) { PlayerInfo[para1][pTeam] = 5; gTeam[para1] = 5; ftext = "Yakuza"; ChosenSkin[para1] = 121; SetPlayerSkin(para1, 121); }
					        else if(PlayerInfo[playerid][pLeader] == 7) { return 1; }
					        else if(PlayerInfo[playerid][pLeader] == 8) { PlayerInfo[para1][pTeam] = 10; gTeam[para1] = 12; ftext = "Hitman Agency"; ChosenSkin[para1] = 258; SetPlayerSkin(para1, 258); }
					        else if(PlayerInfo[playerid][pLeader] == 9) { PlayerInfo[para1][pTeam] = 12; gTeam[para1] = 12; ftext = "Kanal 5 Studio"; ChosenSkin[para1] = 1; SetPlayerSkin(para1, 1); }
					        else if(PlayerInfo[playerid][pLeader] == 10) { PlayerInfo[para1][pTeam] = 12; gTeam[para1] = 12; ftext = "Taxi Companijata"; ChosenSkin[para1] = 210; SetPlayerSkin(para1, 210); }
					        else if(PlayerInfo[playerid][pLeader] == 12) { PlayerInfo[para1][pTeam] = 5; gTeam[para1] = 5; ftext = "Los Santos Gang"; ChosenSkin[para1] = 175; SetPlayerSkin(para1, 175); }
					        else if(PlayerInfo[playerid][pLeader] == 13) { PlayerInfo[para1][pTeam] = 5; gTeam[para1] = 5; ftext = "Groove Street Gang"; ChosenSkin[para1] = 105; SetPlayerSkin(para1, 105); }
					        else if(PlayerInfo[playerid][pLeader] == 11) { PlayerInfo[para1][pTeam] = 12; gTeam[para1] = 12; ftext = "School Instructors"; ChosenSkin[para1] = 59; SetPlayerSkin(para1, 59); }
					        else { return 1; }
						    new str[128];
							new playername[MAX_PLAYER_NAME];
							GetPlayerName(playerid,playername,sizeof(playername));
							format(str,sizeof(str),"Liderot %s ve pokani da se pridruzite vo negovata ORG",playername);
							ShowPlayerDialog(para1,1,DIALOG_STYLE_MSGBOX,"Invitation",str,"Accept","Decline");
							PlayerInfo[para1][pMember] = PlayerInfo[playerid][pLeader];
							PlayerInfo[para1][pRank] = 1;
							SendClientMessage(para1, COLOR_LIGHTBLUE, string);
							SetPlayerInterior(para1,0);
					}
				}//not connected
			}
			else
			{
				SendClientMessage(playerid, COLOR_GRAD1, "   Ne ste ovlasteni za taa komanda,samo lideri!");
			}
		}
		return 1;
	}
how can i make the On dialog resposne that when i send the invitation he will need to accept it ? before he can join how can i make that i tryed really i get a lot of errors!
Reply
#2

Quote:
Originally Posted by Dark Crow
Посмотреть сообщение
i get a lot of errors!
State the errors here then, we won't start guessing what your errors might be.
Reply
#3

the problem is when i try to move the
Код:
if(PlayerInfo[playerid][pLeader] == 1) { PlayerInfo[para1][pTeam] = 2; gTeam[para1] = 2; ftext = "Police Department"; ChosenSkin[para1] = 282; SetPlayerSkin(para1, 282); }
					        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] = 2; gTeam[para1] = 2; ftext = "ARM"; ChosenSkin[para1] = 285; SetPlayerSkin(para1, 285); }
					        else if(PlayerInfo[playerid][pLeader] == 4) { PlayerInfo[para1][pTeam] = 1; gTeam[para1] = 1; ftext = "Ambulance"; ChosenSkin[para1] = 276; SetPlayerSkin(para1, 276); }
					        else if(PlayerInfo[playerid][pLeader] == 5) { PlayerInfo[para1][pTeam] = 5; gTeam[para1] = 5; ftext = "La Cosa Nostra"; ChosenSkin[para1] = 125; SetPlayerSkin(para1, 125); }
					        else if(PlayerInfo[playerid][pLeader] == 6) { PlayerInfo[para1][pTeam] = 5; gTeam[para1] = 5; ftext = "Yakuza"; ChosenSkin[para1] = 121; SetPlayerSkin(para1, 121); }
					        else if(PlayerInfo[playerid][pLeader] == 7) { return 1; }
					        else if(PlayerInfo[playerid][pLeader] == 8) { PlayerInfo[para1][pTeam] = 10; gTeam[para1] = 12; ftext = "Hitman Agency"; ChosenSkin[para1] = 258; SetPlayerSkin(para1, 258); }
					        else if(PlayerInfo[playerid][pLeader] == 9) { PlayerInfo[para1][pTeam] = 12; gTeam[para1] = 12; ftext = "Kanal 5 Studio"; ChosenSkin[para1] = 1; SetPlayerSkin(para1, 1); }
					        else if(PlayerInfo[playerid][pLeader] == 10) { PlayerInfo[para1][pTeam] = 12; gTeam[para1] = 12; ftext = "Taxi Companijata"; ChosenSkin[para1] = 210; SetPlayerSkin(para1, 210); }
					        else if(PlayerInfo[playerid][pLeader] == 12) { PlayerInfo[para1][pTeam] = 5; gTeam[para1] = 5; ftext = "Los Santos Gang"; ChosenSkin[para1] = 175; SetPlayerSkin(para1, 175); }
					        else if(PlayerInfo[playerid][pLeader] == 13) { PlayerInfo[para1][pTeam] = 5; gTeam[para1] = 5; ftext = "Groove Street Gang"; ChosenSkin[para1] = 105; SetPlayerSkin(para1, 105); }
					        else if(PlayerInfo[playerid][pLeader] == 11) { PlayerInfo[para1][pTeam] = 12; gTeam[para1] = 12; ftext = "School Instructors"; ChosenSkin[para1] = 59; SetPlayerSkin(para1, 59); }
					        else { return 1; }
To the OnDialogRepsonse i get errors that i need to move another line i move that line also another error and so on
How can i make it when a player sends an invitation the other player needs to first accept te invitation then join on this script the player automaticaly joins the team even if he picks No
Reply
#4

Quote:
Originally Posted by Dark Crow
Посмотреть сообщение
the problem is when i try to move the
Код:
if(PlayerInfo[playerid][pLeader] == 1) { PlayerInfo[para1][pTeam] = 2; gTeam[para1] = 2; ftext = "Police Department"; ChosenSkin[para1] = 282; SetPlayerSkin(para1, 282); }
					        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] = 2; gTeam[para1] = 2; ftext = "ARM"; ChosenSkin[para1] = 285; SetPlayerSkin(para1, 285); }
					        else if(PlayerInfo[playerid][pLeader] == 4) { PlayerInfo[para1][pTeam] = 1; gTeam[para1] = 1; ftext = "Ambulance"; ChosenSkin[para1] = 276; SetPlayerSkin(para1, 276); }
					        else if(PlayerInfo[playerid][pLeader] == 5) { PlayerInfo[para1][pTeam] = 5; gTeam[para1] = 5; ftext = "La Cosa Nostra"; ChosenSkin[para1] = 125; SetPlayerSkin(para1, 125); }
					        else if(PlayerInfo[playerid][pLeader] == 6) { PlayerInfo[para1][pTeam] = 5; gTeam[para1] = 5; ftext = "Yakuza"; ChosenSkin[para1] = 121; SetPlayerSkin(para1, 121); }
					        else if(PlayerInfo[playerid][pLeader] == 7) { return 1; }
					        else if(PlayerInfo[playerid][pLeader] == 8) { PlayerInfo[para1][pTeam] = 10; gTeam[para1] = 12; ftext = "Hitman Agency"; ChosenSkin[para1] = 258; SetPlayerSkin(para1, 258); }
					        else if(PlayerInfo[playerid][pLeader] == 9) { PlayerInfo[para1][pTeam] = 12; gTeam[para1] = 12; ftext = "Kanal 5 Studio"; ChosenSkin[para1] = 1; SetPlayerSkin(para1, 1); }
					        else if(PlayerInfo[playerid][pLeader] == 10) { PlayerInfo[para1][pTeam] = 12; gTeam[para1] = 12; ftext = "Taxi Companijata"; ChosenSkin[para1] = 210; SetPlayerSkin(para1, 210); }
					        else if(PlayerInfo[playerid][pLeader] == 12) { PlayerInfo[para1][pTeam] = 5; gTeam[para1] = 5; ftext = "Los Santos Gang"; ChosenSkin[para1] = 175; SetPlayerSkin(para1, 175); }
					        else if(PlayerInfo[playerid][pLeader] == 13) { PlayerInfo[para1][pTeam] = 5; gTeam[para1] = 5; ftext = "Groove Street Gang"; ChosenSkin[para1] = 105; SetPlayerSkin(para1, 105); }
					        else if(PlayerInfo[playerid][pLeader] == 11) { PlayerInfo[para1][pTeam] = 12; gTeam[para1] = 12; ftext = "School Instructors"; ChosenSkin[para1] = 59; SetPlayerSkin(para1, 59); }
					        else { return 1; }
To the OnDialogRepsonse i get errors that i need to move another line i move that line also another error and so on
How can i make it when a player sends an invitation the other player needs to first accept te invitation then join on this script the player automaticaly joins the team even if he picks No
You just set it if the player selects either "Yes" or "No" it puts him in the team....
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)