19.08.2014, 12:48
My DynamicCP's in the script has reached about 200 CP's, so it took so long to script what would this CP does like OnPlayerEnterDynamicCP (1400 Lines), OnPlayerLeaveDynamicCP (1000 Lines) and so on...
My question is: can i make it in easiest way than this? just like save the CP's into a file and looping it by 5 -6 Lines for what it does?
Does it cause any bugs if i do it just like conflict the cps to eachothers?
Example:
My question is: can i make it in easiest way than this? just like save the CP's into a file and looping it by 5 -6 Lines for what it does?
Does it cause any bugs if i do it just like conflict the cps to eachothers?
Example:
pawn Код:
public OnPlayerEnterDynamicCP(playerid,checkpointid)
{
for(new i = 0; i < MAX_CHECKPOINTS; i++)
{
if(checkpointid == "the id or the name that i store it in the file") //let's say the name is Ammunation
{
SetPlayerPos(playerid,CPInfo[checkpointid][CPx],CPInfo[checkpointid][CPy],CPInfo[checkpointid][CPz])
}
}
}