[HELP] /invite bug
#1

Ok when i /invite someone it invites them but when they type in done they spawn somewhere else flying the air and den spawns in BlueBerry how can i fix it heres my cmds
Код:
	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 && PlayerInfo[para1][pFMember] == 255)
					  {
					    if(PlayerInfo[playerid][pLeader] == 1) { PlayerInfo[para1][pTeam] = 2; gTeam[para1] = 2; ftext = "Police Force"; ChosenSkin[para1] = 71; SetPlayerSkin(para1, 71); }
					    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 = "National Guard"; ChosenSkin[para1] = 287; SetPlayerSkin(para1, 287); }
					    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 = "Surenos"; ChosenSkin[para1] = 116; SetPlayerSkin(para1, 116); }
					    else if(PlayerInfo[playerid][pLeader] == 6) { PlayerInfo[para1][pTeam] = 6; gTeam[para1] = 6; ftext = "TheCrimisons"; ChosenSkin[para1] = 125; SetPlayerSkin(para1, 125); }
					    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] = 249; SetPlayerSkin(para1, 249); }
					    else if(PlayerInfo[playerid][pLeader] == 9) { PlayerInfo[para1][pTeam] = 12; gTeam[para1] = 12; ftext = "ABC Studio"; ChosenSkin[para1] = 148; SetPlayerSkin(para1, 148); }
					    //else if(PlayerInfo[playerid][pLeader] == 10) { PlayerInfo[para1][pTeam] = 12; gTeam[para1] = 12; ftext = "Taxi Cab Company"; 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] == 14) { PlayerInfo[para1][pTeam] = 5; gTeam[para1] = 5; ftext = "Yamaguchi"; ChosenSkin[para1] = 169; SetPlayerSkin(para1, 169); }
					    else if(PlayerInfo[playerid][pLeader] == 15) { PlayerInfo[para1][pTeam] = 15; gTeam[para1] = 15; ftext = "Chornaya Bratva"; ChosenSkin[para1] = 258; SetPlayerSkin(para1, 258); }
					    else if(PlayerInfo[playerid][pLeader] == 16) { PlayerInfo[para1][pTeam] = 5; gTeam[para1] = 5; ftext = "Top Shottas"; ChosenSkin[para1] = 143; SetPlayerSkin(para1, 143); }
					    else if(PlayerInfo[playerid][pLeader] == 17) { PlayerInfo[para1][pTeam] = 5; gTeam[para1] = 5; ftext = "VatosLocos"; ChosenSkin[para1] = 108; SetPlayerSkin(para1, 108); }
					    	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 has invited %s to join %s.", sendername, giveplayer, ftext);
							format(string, sizeof(string), "  You have Joined the %s, you were invited by Leader %s", ftext, sendername);
							SendClientMessage(para1, COLOR_LIGHTBLUE, string);
							format(string, sizeof(string), "  You have Invited %s to join the %s.", giveplayer,ftext);
							SendClientMessage(playerid, COLOR_LIGHTBLUE, string);
							SetPlayerInterior(para1,0);
							new rand = random(sizeof(gInviteSpawns));
							SetPlayerPos(para1, gInviteSpawns[rand][0], gInviteSpawns[rand][1], gInviteSpawns[rand][2]); // Warp the player
							SetPlayerFacingAngle(para1, gInviteSpawns[rand][3]);
							SetPlayerCameraPos(para1,gInviteSpawns[rand][0] + 3, gInviteSpawns[rand][1], gInviteSpawns[rand][2]);
							SetPlayerCameraLookAt(para1,gInviteSpawns[rand][0], gInviteSpawns[rand][1], gInviteSpawns[rand][2]);
							TogglePlayerControllable(para1, 0);
						  SelectChar[para1] = 255;
						  SelectCharID[para1] = PlayerInfo[para1][pMember];
						  SelectCharPlace[para1] = 1;
						  PlayerInfo[para1][pModel] = ChosenSkin[para1];
					  	PlayerInfo[para1][pChar] = ChosenSkin[para1];
						  gTeam[para1] = 12;
					    PlayerInfo[para1][pTeam] = 12;
					    SetPlayerPos(playerid,1547.1058,-1676.7164,13.9429)
						  SendClientMessage(para1, COLOR_LIGHTRED, "* Use 'next' to Select the char you want to use.");
						  SendClientMessage(para1, COLOR_LIGHTRED, "* If you've found the Char you want to use, type 'done'.");
						}
						else
						{
						  SendClientMessage(playerid, COLOR_GREY, " That player is currently Wanted / a Different Team / or already a Family Member.");
						  return 1;
						}
					}
				}//not connected
			}
			else
			{
				SendClientMessage(playerid, COLOR_GRAD1, "  You are not authorized to use that command(leaders only)!");
			}
		}
		return 1;
	}
Reply
#2

Reply im tired of no one replying please
Reply
#3

Quote:
Originally Posted by Lilcuete
Ok when i /invite someone it invites them but when they type in done they spawn somewhere else flying the air and den spawns in BlueBerry how can i fix it heres my cmds
You're english isn't too good. What do you mean, when they type /done they spawn in the air and then end up in Blueberry? If so, then post your /done code.
Reply
#4

its not /done its "done" when they type
Reply
#5

Код:
	else if ((strcmp("done", tmp, true, strlen(tmp)) == 0) && (strlen(tmp) == strlen("done")))
		{
		  if(ChangePos2[playerid][1] == 1)
		  {
		    SetPlayerInterior(playerid, ChangePos2[playerid][0]);
		    SetPlayerPos(playerid, ChangePos[playerid][0],ChangePos[playerid][1],ChangePos[playerid][2]);
		    ChangePos2[playerid][1] = 0;
		    //return 0;
		  }
		  PlayerInfo[playerid][pModel] = ChosenSkin[playerid];
		  PlayerInfo[playerid][pChar] = ChosenSkin[playerid];
		  SetSpawnInfo(playerid, PlayerInfo[playerid][pTeam], PlayerInfo[playerid][pModel],0.0,0.0,0.0,0,0,0,0,0,0,0);
		  gTeam[playerid] = PlayerInfo[playerid][pTeam];
			SetPlayerToTeamColor(playerid);
			MedicBill[playerid] = 0;
			SpawnPlayer(playerid);
		  SelectCharPlace[playerid] = 0;
		  SelectCharID[playerid] = 0;
		  SelectChar[playerid] = 0;
		  SetTimerEx("backtoclothes", 500, false, "i", playerid);
		  return 0;
		}
		else
		{
		  SendClientMessage(playerid, COLOR_WHITE, "* Use 'next', or 'done'.");
		  return 0;
		}
	}
Reply
#6

anyone?
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)