Help! playerid not being called in local functions?
#1

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

PHP код:
    if(pInfo[playerid][OwnedHouses] == 1)
    {
            new 
Houseid h_ID[playerid];
            
hInfo[Houseid][h_OwnerID] = playerid;
            
SaveHouse(Houseid);
            
LoadHouse(Houseid);
    } 
sorry for bad english, but i think i explained my problem well? so anyone can help me out??
Reply


Messages In This Thread
Help! playerid not being called in local functions? - by Airman123 - 06.06.2015, 13:20
Re: Help! playerid not being called in local functions? - by [KHK]Khalid - 06.06.2015, 14:18
Re: Help! playerid not being called in local functions? - by Vince - 06.06.2015, 14:18
Re: Help! playerid not being called in local functions? - by Airman123 - 26.06.2015, 11:44

Forum Jump:


Users browsing this thread: 1 Guest(s)