SA-MP Forums Archive
Checkpoint problem - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Checkpoint problem (/showthread.php?tid=581595)



Checkpoint problem - kyriakos587 - 14.07.2015

Hi, i make this check point id ExitCP[i] = ...

but when im in this checkpoint i doesn't do anything

PHP код:
//OnGameModeInit
for(new i=0;i<MAX_STORES;i++){
        new 
file[50];
        
format(file,sizeof(file),"Server/ExitStores/%d.ini",i);
        if(
dini_Exists(file))
        {
            
ExitCP[i] = CreateDynamicCP(dini_Float(file,"x"),dini_Float(file,"y"),dini_Float(file,"z"),2.0,dini_Int(file,"World"),dini_Int(file,"Interior"), -1,25.0);
            
LabelExit[i] = CreateDynamic3DTextLabel("[Exit]"0xFFFF00AAdini_Float(file,"x"),dini_Float(file,"y"),dini_Float(file,"z"),100.0,INVALID_PLAYER_ID,INVALID_VEHICLE_ID,dini_Int(file,"World"),dini_Int(file,"Interior"),0,-1,25);
        }
    }
//OnPlayerEnterDynamicCP
for(new i=0;i<MAX_STORES;i++)
    {
        new 
file[50];
        
format(file,sizeof(file),"Server/ExitStores/%d.ini",i);
        if(
dini_Exists(file)){
        if(
checkpointid == ExitCP[i] && EnterCP[playerid] == 0)
        {
            
SetTimerEx("ResetCP",500,false,"d",playerid);
            
EnterCP[playerid] = 1;
            
SetPlayerVirtualWorld(playerid,0);
            
SetPlayerPos(playerid,AccInfo[playerid][X],AccInfo[playerid][Y],AccInfo[playerid][Z]);
            
SetPlayerInterior(playerid,0);
        }}
    } 



Re: Checkpoint problem - kyriakos587 - 14.07.2015

FIXED!!