11.07.2009, 00:32
Okay i have house system but i don't know how to make a GameTextForPlayer function for it :S example: format(string,sizeof(string),"~w~ Owner : %s",OWNER); GameTextForPlayer(blababla);
So the problem is every house is house ID 0! I bought house ID 0 and now everytime i go to every house i own it :S but i really don't!
Here's what i tried,
So the problem is every house is house ID 0! I bought house ID 0 and now everytime i go to every house i own it :S but i really don't!
Here's what i tried,
pawn Код:
forward GameTextTimer(playerid);
public GameTextTimer(playerid)
{
new tmp[128];
new cmdtext[128];
new idx;
tmp = strtok(cmdtext, idx);
new id = strval(tmp);
new string[256];
for(new i = 0; i < MAX_PICKUPS; i++)
{
if(PlayerToPoint(3,playerid,Houses[id][EnterX],Houses[id][EnterY],Houses[id][EnterZ]))
{
format(string,sizeof(string),"~w~%s~n~~g~Owner: %s~n~~w~Price: %d~n~Rent: %d",Houses[id][Description],Houses[id][Owner],Houses[id][HousePrice],Houses[id][RentCost]);
GameTextForPlayer(playerid, string, 500, 3);
}
}
return 1;
}
pawn Код:
public OnPlayerSpawn(playerid)
{
SetTimerEx("GameTextTimer", 1, true, "i", playerid);
return 1;
}