This is my house exit command :
Код:
if(!strcmp(cmdtext, "/exit", true))
{
new house = GetPlayerVirtualWorld(playerid);
SetPlayerInterior(playerid,0);
SetPlayerVirtualWorld(playerid,0);
SetPlayerPos(playerid,PickupIDs[house][0],PickupIDs[house][1],PickupIDs[house][2]);
playerDB[playerid][pickup]=false;
SetTimerEx("WantPickup",7000,0,"i",playerid); //exiting
return 1;
}
This is pickup code :
FIX_PICKUPS
Код:
if(pickupid > pickups[0][namai]-1 && pickupid < pickups[1][namai]+1) //HOUSES
{
new name[MAX_PLAYER_NAME];
GetPlayerName(playerid,name,sizeof(name));
if(!strcmp(name,houseDB[pickupid][owner_name],true)) //If player house owner
{
SendClientMessage(playerid,COLOR,"* {00FFEE}This is your home! {FFFFFF}House commands:");
SendClientMessage(playerid,COLOR,"* {6EF83C}/heal /selhouse ");
SendClientMessage(playerid,COLOR,"* {FF00EA}/exit");
new inter = houseDB[pickupid][setting];
SetPlayerInterior(playerid,houseSETTINGS[inter][interior]);
SetPlayerPos(playerid,houseSETTINGS[inter][enter_pos][0],houseSETTINGS[inter][enter_pos][1],houseSETTINGS[inter][enter_pos][2]);
SetPlayerVirtualWorld(playerid,pickupid);
return 1;
}
My created pickups codes looks like this :
Код:
pickups[0][namai]=CreatePickupA(1273 ,2, -2789.889404, -181.189849, 9.991617);
CreatePickupA(1273 ,2, -2791.019531, -82.611297, 7.195312);
CreatePickupA(1273 ,2, -1810.5671,1325.5807,8.1552);
CreatePickupA(1273 ,2, -2482.7854,121.7706,32.1258);
pickups[1][namai]=CreatePickupA(1273 ,2, -2216.985351, 577.820617, 35.171875);