06.06.2015, 13:20
Hello,
Today, i just found something that amazed me.
we all know there are samp local functions such as:-
OnPlayerSpawn(playerid);
OnPlayerConnect(playerid);
OnPlayerDisconnect(playerid);
You see? playerid is defined? but it doesn't works as it should.
my problem is, i've made houses in ma server. there is a thing "OwnerID" in it.
Im using dini saving system.
So under onplayerspawn i used
if players has a owned house, hInfo[houseid][ownerid] = playerid;
and savehousestats(houseid);
but it doesn't works and in the house .ini file its still -1 (no id)..
so im having problems in breaking system (owner online/offline)
i need some one help? how can i fix it.
ownerid is replaced perfectly when a owner visits house (i used same code)
and when an unowned house is bought by a player, his id is written in OWNERID!
// onplayerspawn code
sorry for bad english, but i think i explained my problem well? so anyone can help me out??
Today, i just found something that amazed me.
we all know there are samp local functions such as:-
OnPlayerSpawn(playerid);
OnPlayerConnect(playerid);
OnPlayerDisconnect(playerid);
You see? playerid is defined? but it doesn't works as it should.
my problem is, i've made houses in ma server. there is a thing "OwnerID" in it.
Im using dini saving system.
So under onplayerspawn i used
if players has a owned house, hInfo[houseid][ownerid] = playerid;
and savehousestats(houseid);
but it doesn't works and in the house .ini file its still -1 (no id)..
so im having problems in breaking system (owner online/offline)
i need some one help? how can i fix it.
ownerid is replaced perfectly when a owner visits house (i used same code)
and when an unowned house is bought by a player, his id is written in OWNERID!
// onplayerspawn code
PHP код:
if(pInfo[playerid][OwnedHouses] == 1)
{
new Houseid = h_ID[playerid];
hInfo[Houseid][h_OwnerID] = playerid;
SaveHouse(Houseid);
LoadHouse(Houseid);
}