IsPlayerInArea - 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: IsPlayerInArea (
/showthread.php?tid=109784)
IsPlayerInArea -
Freddy Z - 22.11.2009
I want to set this command so people go near a house door, and then i do SetPlayerPos to an interior. Can you help me?
Re: IsPlayerInArea -
MenaceX^ - 22.11.2009
Where is the problem?
Re: IsPlayerInArea -
Freddy Z - 22.11.2009
can you analyze the coordinates?what one should be the x coorindate? and the z? the y?
Re: IsPlayerInArea -
Jeffry - 22.11.2009
Can this also be with a pickup. So when they pick it up, they will be set into the house.
Want it like this?
Re: IsPlayerInArea -
Freddy Z - 22.11.2009
Quote:
Originally Posted by Jeffry
Can this also be with a pickup. So when they pick it up, they will be set into the house.
Want it like this?
|
yes please it would be better!
Re: IsPlayerInArea -
Jeffry - 22.11.2009
Check your PM box.
I need the coords, give them to me, or show me. xD
I will make it for you then.
Re: IsPlayerInArea -
Correlli - 22.11.2009
You can also check
this if you want to know how to get IsPlayerInArea coords on the easy way.
Re: IsPlayerInArea -
Jeffry - 22.11.2009
ON top of your gamemode:
pawn Код:
new housein;
new houseout;
Put under "OnGameModeInt"
pawn Код:
housein = CreatePickup(1318, 1, -86.0824,-300.9615,2.7646, 10.8203);
houseout = CreatePickup(1318, 1, 2575.9456,-1303.7881,1044.1250);
Then at "OnPlayerPickupPickup"
pawn Код:
public OnPlayerPickUpPickup(playerid, pickupid)
{{
if(pickupid == housein)
{SetPlayerPos(playerid, 2574.5510,-1302.3300,1044.1250); // change the coords to the ones of your house
SetPlayerInterior(playerid, 2); // use /interior to see the interior number
SetPlayerFacingAngle(playerid, 50);
SendClientMessage(playerid, 0x00FF00FF, "Have fun in the house."); // Just fun, delete if you dont need.}
if(pickupid == houseout)
{
SetPlayerPos(playerid,-90.4862,-300.4058,2.7057); // infront of the factory again
SetPlayerFacingAngle(playerid, 90); // Turning....
SetPlayerInterior(playerid, 0); //0 = normal
SendClientMessage(playerid, 0x00FF00FF, "Take care outside."); // Just fun, delete if you dont need.
}
return 1;
}
}
If any errors occur, just say.
Hope that helped you.
Re: IsPlayerInArea -
Jeffry - 22.11.2009
Okay, i updated my post a bit upper.
Try it, hope you like it.
Gimme a comment please.