06.12.2011, 23:47
Olб, como faзo para que quando o player deslogue o objeto seja destruнdo altomaticamente?
pawn Code:
stock DeleteRadio(playerid)
{
for(new i = 0; i < sizeof(Roadblocks); ++i)
{
if(IsPlayerInRangeOfPoint(playerid, 5.0, Roadblocks[i][sX], Roadblocks[i][sY], Roadblocks[i][sZ]))
{
if(Roadblocks[i][sCreated] == 1)
{
Roadblocks[i][sCreated] = 0;
Roadblocks[i][sX] = 0.0;
Roadblocks[i][sY] = 0.0;
Roadblocks[i][sZ] = 0.0;
DestroyDynamicObject(Roadblocks[i][sObject]);
return 0x01;
}
}
}
return 0;
}