08.03.2011, 17:19
It's not "When player is IN Checkpoint"? lol.. you're talking about that it's like "When player driving IN Checkpoint". It's strange.
public OnPlayerEnterCheckPoint(playerid) { if(GetVehicleSpeed(GetPlayerVehicleID(playerid)) == 0.0) { ShowMenuForPlayer(Garage, playerid); } return true; }
public OnPlayerEnterDynamicCP(playerid, checkpointid)
if(checkpointid == SerwerInfo[sCheckpoint][1]
|| checkpointid == SerwerInfo[sCheckpoint][2]
|| checkpointid == SerwerInfo[sCheckpoint][3]
|| checkpointid == SerwerInfo[sCheckpoint][4]
|| checkpointid == SerwerInfo[sCheckpoint][5]
|| checkpointid == SerwerInfo[sCheckpoint][6]
|| checkpointid == SerwerInfo[sCheckpoint][7])
{
switch(checkpointid)
{
case SerwerInfo[sCheckpoint][1]:
{
SendClientMessage(playerid, COLOR_GREEN, "...");
}
}
error 008: must be a constant expression; assumed zero
case 1: case 2: ..
Streamer_TickRate(50);
CreateDynamicObject(983,-2017.02600098,-99.11920166,35.09722137,0.00000000,0.00000000,0.00000000); //convertffs(1)
CreateDynamicObject(983,-2017.02539062,-90.36914062,35.09722137,0.00000000,0.00000000,0.00000000); //convertffs(2)
CreateDynamicObject(1598,-1898.56518555,-2770.94628906,6.51191854,0.00000000,0.00000000,0.00000000,-1, -1, -1, 250.0);
Now, the objects are streamed just when i'm next to them but it had less lags...
How much do you put in streamer.inc for draw distance ? 250 ? |
CreateDynamicObject(modelid, Float:x, Float:y, Float:z, Float:rx, Float:ry, Float:rz, worldid = -1, interiorid = -1, playerid = -1, Float:distance = 200.0);
new car = GetPlayerVehicleID(playerid);
for(new t = 0; t < 25; t++) // IDK what this loop is good for, but it has been made by the previous owner.
{
Streamer_UpdateEx(playerid, posX, posY, posZ);
SetVehiclePos(car, posX, posY, posZ);
}
Streamer_UpdateEx(playerid, posX, posY, posZ);
SetVehiclePos(car, posX, posY, posZ);