#include a_samp
new bool:in[MAX_PLAYERS];
public OnPlayerInteriorChange(playerid, newinteriorid, oldinteriorid)
{
if(newinteriorid == 4)//ha belép a 4-es id interiorba
{
in[playerid]= true;
}
if(oldinteriorid == 4)//ha kilép a 4-es id interiorból
{
in[playerid]= false;
}
return 1;
}
public OnPlayerCommandText(playerid, cmdtext[])
{
if (strcmp(\"/buy\", cmdtext, true, 10) == 0)
{
if (in[playerid] == false) return SendClientMessage(playerid, 0xFFFFFFAA, \"HIBA: Nem vagy interiorba\");
SendClientMessage(playerid, 0xFFFFFFAA, \"Megvetted a házat\");
return 1;
}
return 0;
}
public OnPlayerSpawn(playerid)
{
in[playerid]= false;
return 1;
}