29.10.2010, 00:53
if (strcmp(cmdtext, "/enter", true)==0)
{
new i, Float:X, Float:Y, Float:Z; //this is where your coords will get stored
for (i = 0; i < MAX_PLAYERS; i++) //this is a loop
{
GetPlayerPos(i, X, Y, Z); //stores your pos
if(X >= minimum X && X <= Maximum X && Y >= Minimum Y && Y <= Maximum Y) //coords for entering house
{
SetPlayerInterior(playerid, interiorID); //interiorID is the Interior the house is in
SetPlayerPos(playerid, X, Y, Z); // X, Y, Z are the coords where the house is located
GameTextForPlayer(playerid, "Welcome to Owners house",3000,5); //Change Owners to name of player the house is of
}
}
return 1;
}
where would i put the co-ords for entering the house
it confuses me
This comes for samp wiki but confuses me, can anyone else put it any clearer please?
Thanks
{
new i, Float:X, Float:Y, Float:Z; //this is where your coords will get stored
for (i = 0; i < MAX_PLAYERS; i++) //this is a loop
{
GetPlayerPos(i, X, Y, Z); //stores your pos
if(X >= minimum X && X <= Maximum X && Y >= Minimum Y && Y <= Maximum Y) //coords for entering house
{
SetPlayerInterior(playerid, interiorID); //interiorID is the Interior the house is in
SetPlayerPos(playerid, X, Y, Z); // X, Y, Z are the coords where the house is located
GameTextForPlayer(playerid, "Welcome to Owners house",3000,5); //Change Owners to name of player the house is of
}
}
return 1;
}
where would i put the co-ords for entering the house
it confuses meThis comes for samp wiki but confuses me, can anyone else put it any clearer please?
Thanks

