Helppp !
#1

PUBLIC:CentraleExplosion()
{
for(new i=0; i<MAX_PLAYERS; i++)
{
if(PlayerToPoint(2.0, i, -1477.1708,978.7495,10.7425) || PlayerToPoint(2.0, i, -1477.0042,976.5752,10.7425) || PlayerToPoint(2.0, i, -1476.3779,973.9634,10.7360) || PlayerToPoint(2.0, i, -1475.1206,971.6609,10.7360) || PlayerToPoint(2.0, i, -1478.2518,973.4955,10.7425) || PlayerToPoint(2.0, i, -1479.8469,977.2452,10.7425) || PlayerToPoint(2.0, i, -1471.8712,978.3095,10.7360))
{
if(CentraleBlown == 1)
{
SendClientMessage(i,COLOR_RED,"Vous devez exploser la centrale йlйctrique.");
new Float, Float:y, Float:z;
GetPlayerPos(i, x, y, z);
CreateExplosion(x, y, z, 12, 10.0);
}
}
}
}

When i go near to those positions, i don't get any explosion !

Help?
Reply
#2

So I guess the CentraleBlown is not equal to 1. Show the code where it is set to 1
Reply
#3

I guess that the loopy is not the right.. ?
Reply
#4

Hello!

Try this, what is printing in the console?
PHP код:
PUBLIC:CentraleExplosion()
{
    
printf("DEBUG: 1");
    for(new 
i=0i<MAX_PLAYERSi++)
    {
        
printf("Player: %i",i);
        if(
PlayerToPoint(2.0i, -1477.1708,978.7495,10.7425) || PlayerToPoint(2.0i, -1477.0042,976.5752,10.7425) || PlayerToPoint(2.0i, -1476.3779,973.9634,10.7360) || PlayerToPoint(2.0i, -1475.1206,971.6609,10.7360) || PlayerToPoint(2.0i, -1478.2518,973.4955,10.7425) || PlayerToPoint(2.0i, -1479.8469,977.2452,10.7425) || PlayerToPoint(2.0i, -1471.8712,978.3095,10.7360))
        {
            print(
"IsInPosition");
            
printf("CentraleBlown: %i",CentraleBlown);
            if(
CentraleBlown == 1)
            {
                
SendClientMessage(i,COLOR_RED,"Vous devez exploser la centrale йlйctrique.");
                new 
FloatFloat:yFloat:z;
                
GetPlayerPos(ixyz);
                
CreateExplosion(xyz1210.0);
            }
        }
    }

Mencent
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)