Проблема с CheckPoint
#1

Доброе время суток...
Проблема с CheckPoint
Посмотреть проблему можно тут:
[ame]http://www.youtube.com/watch?v=Zkb2Pr4bGLY[/ame]

Как я понимаю проблема с таймером и привязкой CP

Код:
в new:
PHP код:
new WoodCP1[MAX_PLAYERS], WoodCP[MAX_PLAYERS]; 
Дальше на диалоге рандомно выбивает CP
PHP код:
switch(random(3))
{
case 
0WoodCP[playerid] = CreateDynamicCP(-558.3461,-96.4911,63.7808100playerid300);
case 
1WoodCP[playerid] = CreateDynamicCP(-566.5664,-96.6741,64.1709100playerid300);
case 
2WoodCP[playerid] = CreateDynamicCP(-575.8914,-97.3578,64.9064100playerid300);

В public OnPlayerEnterDynamicCP(playerid, checkpointid) проверка на CP
PHP код:
if(checkpointid == WoodCP[playerid])
    {
            new 
JoinsTimer[MAX_PLAYERS];
        
ApplyAnimation(playerid"CHAINSAW""WEAPON_csaw"4.110000);
        
DestroyDynamicCP(WoodCP[playerid]);
        
JoinsTimer[playerid] = SetTimerEx("Joins",9800,false,"i",playerid);
    } 
Таймеры:
PHP код:
forward Joins(playerid);
public 
Joins(playerid)
{
    new 
JoinsTimer[MAX_PLAYERS];
    if(
WoodJoins[playerid] == true)
    {
        
ApplyAnimation(playerid"CARRY""liftup"4.100000);
        
JoinsTimer[playerid] = SetTimerEx("JoinS",1500,false,"i"playerid);
    }
    return 
true;
}
forward JoinS(playerid);
public 
JoinS(playerid)
{
    
ClearAnimations(playerid);
    
SetPlayerSpecialAction(playeridSPECIAL_ACTION_CARRY);
    
SetPlayerAttachedObject(playerid1146350.06700.13990.2609, -82.99, -2.09, -70.600.430.290.41);
    
WoodCP1[playerid] = CreateDynamicCP(-536.3078,-74.1449,62.8594,2,0,0,playerid,300);
    return 
true;

Ну и снова public OnPlayerEnterDynamicCP(playerid, checkpointid)
PHP код:
if(checkpointid == WoodCP1[playerid])
    {
        
ApplyAnimation(playerid"CARRY""PUTDWN"4.1011001);
        
SetPlayerAttachedObject(playerid134160.00000.00000.00000.000.000.001.001.001.00);
        
DestroyDynamicCP(WoodCP1[playerid]);
        
SetPlayerSpecialAction(playeridSPECIAL_ACTION_NONE);
        switch(
random(16))
        {
            case 
0WoodCP[playerid] = CreateDynamicCP(-558.3461,-96.4911,63.7808100playerid300);
             case 
1WoodCP[playerid] = CreateDynamicCP(-566.5664,-96.6741,64.1709100playerid300);
             case 
2WoodCP[playerid] = CreateDynamicCP(-575.8914,-97.3578,64.9064100playerid300);
        }
    } 
Вот не могу догнать как исправить...
Reply


Messages In This Thread
Проблема с CheckPoint - by Florens - 22.10.2013, 14:34
Re: Проблема с CheckPoint - by OKStyle - 22.10.2013, 16:18
Re: Проблема с CheckPoint - by Florens - 22.10.2013, 16:29
Re: Проблема с CheckPoint - by Florens - 22.10.2013, 16:34
Re: Проблема с CheckPoint - by OKStyle - 23.10.2013, 08:59
Re: Проблема с CheckPoint - by Florens - 23.10.2013, 14:39

Forum Jump:


Users browsing this thread: 1 Guest(s)