02.08.2013, 23:20
First, sorry about my English.
I got problem with my dynamic house system.
I build everything. Player commands, Admin commands, but i got problem, how to take a pickup, and make him a house.
I did this.
OnPlayerPickUpPickup:
Works fine.
But when i leave pickup it's not changed.
So i did this:
OnPlayerUpdate:
Can someone help me? please.
I got problem with my dynamic house system.
I build everything. Player commands, Admin commands, but i got problem, how to take a pickup, and make him a house.
I did this.
OnPlayerPickUpPickup:
Код:
for(new i; i < MAX_HOUSES; i++) if(pickupid == house[i][hpickup]) { player[playerid][whouseid] = i; }
But when i leave pickup it's not changed.
So i did this:
OnPlayerUpdate:
Код:
new uid = player[playerid][whouseid]; if(uid != -1 && !IsPlayerInRangeOfPoint(playerid, 2, house[uid][outpos][0], house[uid][outpos][1], house[uid][outpos][2])) { player[playerid][whouseid] = -1; }