22.08.2010, 10:48
pawn Код:
public housetimer()
{
for(new i=0;i<MAX_PLAYERS;i++)
{
for(new m=0;m<MAX_HOUSES;m++)
{
if(PlayerToPoint(4.0, i,h2Info[m][iconx],h2Info[m][icony],h2Info[m][iconz]))
{
new str2[256];
new string[256];
if(checkhouse[i] == 0)
{
GetHouseStats(i, GetHouseID(i));
checkhouse[i] = 1;
}
}
else
{
DisablePlayerCheckpoint(i);
checkhouse[i] = 0;
}
}
}
}
Part of housestats code..
if(PlayerToPoint(4.0, playerid,h2Info[hid][iconx],h2Info[hid][icony],h2Info[hid][iconz]))
{
if(checkhouse[playerid] == 0)
{
SetPlayerCheckpoint(playerid, h2Info[hid][iconx], h2Info[hid][icony], h2Info[hid][iconz], 2);
format(string, sizeof(string), "You'r standing on %s's porch", h2Info[hid][Name]);
SendClientMessage(playerid, COLOR_LIGHTGREEN, string);
checkhouse[playerid] = 1;
}
}
else
{
if(checkhouse[playerid] == 1)
{
DisablePlayerCheckpoint(playerid);
checkhouse[playerid] = 0;
}
}
1. When i connect its spam to me .
2. When i placed on one of the houeses spam too.
3. Checkpoint didnt create.