GetPlayerWeaponData
#1

hy,i wana make something when you enter in jail the weapons of player to be reset,and when you exit from jail to give weapons back.
i try with GetPlayerWeaponData and GivePlayerWeapon,when i enter in jail is reset my weapons,but when i exit i don't receive it back

"exit"
Код:
if(strcmp(cmd, "/goout", true) == 0)
	{
	    if(IsPlayerConnected(playerid))
	    {
			if(PlayerToPoint(3.0,playerid,-1968.6345,324.3087,1552.1387))
			{
                if(PlayerInfo[playerid][pLeader] == 1 || PlayerInfo[playerid][pMember] == 1 || PlayerInfo[playerid][pLeader] == 2 || PlayerInfo[playerid][pMember] == 2 || PlayerInfo[playerid][pLeader] == 3 || PlayerInfo[playerid][pMember] == 3 || PlayerInfo[playerid][pJob] == 2)
				{
				    new pWeaponDat[13][2];
				    for(new is=0; is<13; is++)
					{
					    GivePlayerWeapon(playerid, pWeaponDat[is][0], pWeaponDat[is][1]);
					    SendClientMessage(playerid, COLOR_GREY, "*sssssssssss.");//to see if is work,yes work
				 	}
					SetPlayerPos(playerid, 250.1898,86.8858,1002.9178);
				}
				SetPlayerInterior(playerid,6);
				PlayerInfo[playerid][pInt] = 6;
			}
		}
		return 1;
	}
"enter"
Код:
else if (PlayerToPoint(3.0, playerid,250.1685,86.8758,1002.9263))
			{
			    new pWeaponDat[13][2];
						for (new is = 0; is < 13; is++)
						{
							GetPlayerWeaponData(playerid, is, pWeaponDat[is][0], pWeaponDat[is][1]);
							ResetPlayerWeapons(playerid);
							SCM(playerid,COLOR_WHITE,"ss");
						}
			    if(PlayerInfo[playerid][pMember] == 1 || PlayerInfo[playerid][pMember] == 2 || PlayerInfo[playerid][pMember] == 3 || PlayerInfo[playerid][pLeader] == 1 || PlayerInfo[playerid][pLeader] == 2 || PlayerInfo[playerid][pLeader] == 3 || PlayerInfo[playerid][pJob] == 2)
                {
                   SetPlayerInterior(playerid,6);
                   SetPlayerPos(playerid,-1968.4933,324.5110,1552.1387);
			       //GameTextForPlayer(playerid, "~w~ Welcome to ~b~~h~LSPD ~r~~h~Jail", 5000, 1);
			       PlayerInfo[playerid][pInt] = 6;
			    }
            }
Reply
#2

rep ++
please help
Reply
#3

help me pelasee
Reply
#4

help me pelase
Reply
#5

Quote:
Originally Posted by Visio
Посмотреть сообщение
help me pelase
Don't spam please you can make your self banned from the site, wait for a respond
Reply
#6

Try using this one maybe it will help - https://sampforum.blast.hk/showthread.php?tid=118499
Reply


Forum Jump:


Users browsing this thread: 4 Guest(s)