SA-MP Forums Archive
allowing weaps in dm interior - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: allowing weaps in dm interior (/showthread.php?tid=154986)



allowing weaps in dm interior - loonlyrider - 16.06.2010

Ok i have searched through and cannot find any answer's,so i decided to post this to see if any one can help.
This is a dm match inside an interior,but as you guessed it will not work,i had a go with IsPlayerInArea,but i failed
Anyways can anyone shed a bit of light for me
cheers in advance

Код:
			if(IsDMRoomAllowed == 1 && InDM[playerid]==0){
					SetPlayerInterior(playerid,10);
					new randomize=random(sizeof(ROOM));
					SetPlayerPos(playerid, ROOM[randomize][0],ROOM[randomize][1],ROOM[randomize][2]);
					ResetPlayerWeapons(playerid);
   				GivePlayerWeapon(playerid, 8, 1);
					GivePlayerWeapon(playerid, 35, 500);
					GivePlayerWeapon(playerid, 24, 100);
					SetPlayerWorldBounds(playerid,-967.8138,-1137.5613,1100.4780,1018.7023);
					InDM[playerid]=1;
					for (new slot=0; slot < 12; slot++) {
						GetPlayerWeaponData(playerid,slot,weapdata[playerid][WEAPON_SLOT][slot],weapdata[playerid][AMMO_SLOT][slot]);}
					GetPlayerName(playerid, dname, sizeof(dname));
					format(string, sizeof(string), "%s has entered the Deathmatch ROOM: /dmmenu", dname);
					SendClientMessageToAll(COLOR_YELLOW, string);
					SendClientMessage(playerid, COLOR_ORANGE, "KILL ALL !!!");
					SendClientMessage(playerid, COLOR_YELLOW, "To leave the DM ROOM type: /exitdm");}



Re: allowing weaps in dm interior - newarvuti - 16.06.2010

Put this under OnGameModeInit:
pawn Код:
AllowInteriorWeapons(1);



Re: allowing weaps in dm interior - loonlyrider - 16.06.2010

yer i know that one,but i dont wont to allow weapons in other interior's,just for this one dm area.
cheers anyway for youre help


Re: allowing weaps in dm interior - (SF)Noobanatior - 16.06.2010

the only whay you can have both is to allow interior weaps and if the enter a non DM interior then take there guns off them an save them then when newinterior == 0 give them there guns back


Re: allowing weaps in dm interior - loonlyrider - 18.06.2010

ok np cheers for youre help.i get the idea now,but got a shed load of other problems so i have to sort them out first