22.11.2009, 11:47
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?
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? |
new housein;
new houseout;
housein = CreatePickup(1318, 1, -86.0824,-300.9615,2.7646, 10.8203);
houseout = CreatePickup(1318, 1, 2575.9456,-1303.7881,1044.1250);
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;
}
}