help with time
#4

dude i do that he is no't working
PHP код:
public OnGameModeInit()
{
Hospital GangZoneCreate(980.9415,945.9079,1167.788,1132.754);

UsePlayerPedAnims();
    
AddPlayerClass(108,1091.8289,1892.5746,10.8203,181.3648,0,0,0,0,0,0); //Latino (0)
    
AddPlayerClass(206,1544.0514,-1675.7766,13.5577,98.0974,0,0,0,0,0,0); //Souviet (1)
    
AddPlayerClass(179,1544.0514,-1675.7766,13.5577,98.0974,0,0,0,0,0,0); //Arabian(2)
    
AddPlayerClass(287,1544.0514,-1675.7766,13.5577,98.0974,0,0,0,0,0,0); //USA (3)
    
AddPlayerClass(285,-148.1873,1142.0114,19.7422,16.0408,0,0,0,0,0,0); //Europian(4)
    
AddPlayerClass(188,1544.0514,-1675.7766,13.5577,98.0974,0,0,0,0,0,0); //Japan (5).
    
AddPlayerClass(163,1544.0514,-1675.7766,13.5577,98.0974,0,0,0,0,0,0); //Taliban(6)

    
CPS1 CreateCheckpoint(-11058.3783,1013.4809,11.00003.020.0); //hospital
    
CPS1 CreateCheckpoint(-11058.3783,1013.4809,11.00003.020.0);
    
CPS1 CreateCheckpoint(-11058.3783,1013.4809,11.00003.020.0);

    
// Don't use these lines if it's a filterscript
    
SetGameModeText("Blank Script");
    
AddPlayerClass(01958.37831343.157215.3746269.1425000000);
    return 
1;
}

forward timer(playerid);
public 
timer(playerid)
{
    
// Code for taking over the turf.
    
SendClientMessage(playerid0x00FF00AA"You took the turf!");
    {
               
KillTimer(timer[playerid]);
    }
    return 
1;
}

forward Stream();
public 
Stream()
{
    for(new 
iMAX_PLAYERS++) //Loops through 500 players
    
{
      if(
IsPlayerConnected(i)) //Brings the 500 players down to the online ones
      
{
        
PlayerCP[i] = -1;
        for(new 
jCPID 1++) //Loops through all CP's
            
{
                if(
CPDisabled[j] == 0//Checks if the CP is disabled.
                
{
                    if(
IsPlayerInRangeOfPoint(iCPinfo[j][Viewdist], CPinfo[j][CPX], CPinfo[j][CPY], CPinfo[j][CPZ]) && CPActive[i][j] == 1//Is the player in range of a CP
                
{
                
SetPlayerCheckpoint(iCPinfo[j][CPX], CPinfo[j][CPY], CPinfo[j][CPZ], CPinfo[j][Size]);//Sets the player checkpoint
                
PlayerCP[i] = j//Sets the player checkpoint to that in the variable.
                
printf("PCP:%d"j);
           }
                }
            }
        if(
PlayerCP[i] == -1//If there is no CP close enough
            
{
                print(
"NAHBRO");
                
PlayerCP[i] = -1//PlayerCP isn't anything
                
DisablePlayerCheckpoint(i); //Disable any checkpoint visible.
                
continue;
      }
      }
      }
    return 
1;

PHP код:
public OnPlayerEnterCheckpoint(playerid)
{
  if(
PlayerCP[playerid] != -1) return OnPlayerEnterStreamedCheckpoint(playeridPlayerCP[playerid]);
  return 
1;
}

stock OnPlayerEnterStreamedCheckpoint(playeridCPiD)
{
  if(
CPiD == CPS1)
  {
    
GameTextForPlayer(playerid"Stay her to capture hospital!"30003);
timer[playerid] = SetTimerEx("timer"30000true"i"playerid);

        if(
gTeam[playerid]==TEAM_Latino)
        {
        
GangZoneShowForAll(Hospital,0x00F3FFAF);
        
SetPlayerScore(playerid,GetPlayerScore(playerid)+);
        
GivePlayerMoney(playerid,6000);
        
SendClientMessage(playerid,0xFFFFFFFF,"You've capture the zone and receive 500 $ and 5 score");
        
GiveTeamScore(gTeam[playerid]=TEAM_Latino1);
        
SendTeamMessage(COLOR_GREEN"You received 1 Score For a Capture!",TEAM_Latino);
         }
        if(
gTeam[playerid]==TEAM_USA)
        {
        
GangZoneShowForAll(Hospital,0x1400C3FF);
        
SetPlayerScore(playerid,GetPlayerScore(playerid)+);
        
GivePlayerMoney(playerid,6000);
        
SendClientMessage(playerid,0xFFFFFFFF,"You've capture the zone and receive 500 $ and 5 score");
        }
        if(
gTeam[playerid]==TEAM_Arabian)
        {
        
GangZoneShowForAll(Hospital,0xD70000FF);
        
SetPlayerScore(playerid,GetPlayerScore(playerid)+);
        
GivePlayerMoney(playerid,6000);
        
SendClientMessage(playerid,0xFFFFFFFF,"You've capture the zone and receive 500 $ and 5 score");
        }
        if(
gTeam[playerid]==TEAM_Japan)
        {
        
GangZoneShowForAll(Hospital,0xFAFAFFFF);
        
SetPlayerScore(playerid,GetPlayerScore(playerid)+);
        
GivePlayerMoney(playerid,6000);
        
SendClientMessage(playerid,0xFFFFFFFF,"You've capture the zone and receive 500 $ and 5 score");
        }
        if(
gTeam[playerid]==TEAM_Souviet)
        {
        
GangZoneShowForAll(Hospital,0xCA0000FF);
        
SetPlayerScore(playerid,GetPlayerScore(playerid)+);
        
GivePlayerMoney(playerid,6000);
        
SendClientMessage(playerid,0xFFFFFFFF,"You've capture the zone and receive 500 $ and 5 score");
        }
        if(
gTeam[playerid]==TEAM_Europian)
        {
        
GangZoneShowForAll(Hospital,0x005E0089);
        
SetPlayerScore(playerid,GetPlayerScore(playerid)+);
        
GivePlayerMoney(playerid,6000);
        
SendClientMessage(playerid,0xFFFFFFFF,"You've capture the zone and receive 500 $ and 5 score");
        }
  }
  return 
1;

can some one help me
Reply


Messages In This Thread
help with time - by BlacKxStory - 07.02.2012, 03:11
Re: help with time - by Ballu Miaa - 07.02.2012, 03:31
Re: help with time - by Chrillzen - 07.02.2012, 04:42
Re : help with time - by BlacKxStory - 07.02.2012, 12:19
Re: help with time - by MP2 - 07.02.2012, 13:16
Re : help with time - by BlacKxStory - 07.02.2012, 13:22
Re : help with time - by BlacKxStory - 07.02.2012, 13:55
Re: Re : help with time - by MP2 - 07.02.2012, 20:15

Forum Jump:


Users browsing this thread: 1 Guest(s)