How To Fix My Prbleme >>>>/Here/<<<<<
#1

[1]= I Want Progress Bar Like This :



[2]=
When im in the chekpoint i want Time count 30 sec

[3]= iif i sty 30 sec i want desable the checkpoint and i dont want infinitif score nd money because when i capture the zone the server give me infinitif scores and money

My Gm :
PHP код:
// This is a comment
// uncomment the line below if you want to write a filterscript
//#define FILTERSCRIPT
#include <a_samp>
#define TEAM_Latino 1
#define TEAM_Souviet 2
#define TEAM_Arabian 3
#define TEAM_USA 4
#define TEAM_Europian 5
#define TEAM_Japan  6
#define TEAM_Taliban 7
#define TEAM_Latino_COLOR 0x00F3FFAF
#define TEAM_Souviet_COLOR 0xCA0000FF
#define TEAM_Arabian_COLOR 0xD70000FF
#define TEAM_USA_COLOR 0x1400C3FF
#define TEAM_Europian_COLOR 0x005E0089
#define TEAM_Japan_COLOR 0xFAFAFFFF
#define TEAM_Taliban_COLOR 0xFFFFFFFF
#define COLOR_GREEN           0x33AA33AA
new gTeam[MAX_PLAYERS];
#define MAX_CPS 500 //Change it if you need more or less
enum Info //CP ENUM
{
  
Float:CPX//Xpos
  
Float:CPY//Ypos
  
Float:CPZ//Zpos
  
Float:Size//Size of the CP
  
Float:Viewdist //Viewdistance
};
new 
CPID = -1//CPID
new PlayerCP[MAX_PLAYERS] = -1//PlayerCheckpoints (Only one can be active at once).
new CPinfo[MAX_CPS][Info]; //CPINFO
new CPActive[MAX_PLAYERS][MAX_CPS]; //CPActive for player
new CPDisabled[MAX_CPS]; //For disabling checkpoints
new Hospital;
stock CreateCheckpoint(playeridFloat:cpXFloat:cpYFloat:cpZFloat:cpSizeFloat:viewdist 35.0)
{
  
CPID ++; //CPID
  
CPinfo[CPID][CPX] = cpX//CPX Pos
  
CPinfo[CPID][CPY] = cpY//CPY Pos
  
CPinfo[CPID][CPZ] = cpZ//CPZ Pos
  
CPinfo[CPID][Size] = cpSize//Checkpoint Size
  
CPinfo[CPID][Viewdist] = viewdist//View distance
  
if(playerid != -1)
  {
    
CPActive[playerid][CPID] ++; //Makes the player able to view that checkpoint
  
}
  if(
playerid == -1)
  {
    for(new 
ii<MAX_PLAYERSi++)
    {
      
CPActive[i][CPID] ++;
    }
  }
  return 
CPID;
}
new 
CPS1;
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)
    
SetTimer("Stream"300true);
    
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 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;
}
public 
OnGameModeExit()
{
    return 
1;
}
public 
OnPlayerRequestClass(playeridclassid)
{
    
SetPlayerPos(playerid,1984.4445,157.9501,55.9384);
    
SetPlayerCameraPos(playerid,1984.4445,160.9501,55.9384);
    
SetPlayerCameraLookAt(playerid,1984.4445,157.9501,55.9384);
    
SetPlayerTeamFromClass(playeridclassid);
    return 
1;
}
public 
OnPlayerConnect(playerid)
{
    return 
1;
}
public 
OnPlayerDisconnect(playeridreason)
{
    return 
1;
}
public 
OnPlayerSpawn(playerid)
{
GangZoneShowForPlayer(playeridHospital0x00000096);
    
SetPlayerToTeamColor(playerid);
    return 
1;
}
SetPlayerTeamFromClass(playeridclassid)
{
    if (
classid == 0)
    {
        
gTeam[playerid] = TEAM_Latino;
    }
    else if (
classid == 1)
    {
        
gTeam[playerid] = TEAM_Souviet;
    }
    else if (
classid == 2)
    {
        
gTeam[playerid] = TEAM_Arabian;
    }
    else if (
classid == 3)
    {
        
gTeam[playerid] = TEAM_USA;
    }
    else if (
classid == 4)
    {
        
gTeam[playerid] = TEAM_Europian;
    }
    else if (
classid == 5)
    {
        
gTeam[playerid] = TEAM_Japan;
    }
    else if (
classid == 6)
    {
        
gTeam[playerid] = TEAM_Taliban;
    }
}
SetPlayerToTeamColor(playerid)
{
    if (
gTeam[playerid] == TEAM_Latino)
    {
        
SetPlayerColor(playeridTEAM_Latino_COLOR);
    }
    else if (
gTeam[playerid] == TEAM_Souviet)
    {
        
SetPlayerColor(playeridTEAM_Souviet_COLOR);
    }
    else if (
gTeam[playerid] == TEAM_Arabian)
    {
        
SetPlayerColor(playeridTEAM_Arabian_COLOR);
     }
    else if (
gTeam[playerid] == TEAM_USA)
    {
        
SetPlayerColor(playeridTEAM_USA_COLOR);
     }
    else if (
gTeam[playerid] == TEAM_Europian)
    {
        
SetPlayerColor(playeridTEAM_Europian_COLOR);
     }
    else if (
gTeam[playerid] == TEAM_Japan)
    {
        
SetPlayerColor(playeridTEAM_Japan_COLOR);
     }
    else if (
gTeam[playerid] == TEAM_Taliban)
    {
        
SetPlayerColor(playeridTEAM_Taliban_COLOR);
     }
    return 
1;
}
public 
OnPlayerDeath(playeridkilleridreason)
{
    return 
1;
}
public 
OnVehicleSpawn(vehicleid)
{
    return 
1;
}
public 
OnVehicleDeath(vehicleidkillerid)
{
    return 
1;
}
public 
OnPlayerText(playeridtext[])
{
    return 
1;
}
public 
OnPlayerCommandText(playeridcmdtext[])
{
    if (
strcmp("/mycommand"cmdtexttrue10) == 0)
    {
        
// Do something here
        
return 1;
    }
    return 
0;
}
public 
OnPlayerEnterVehicle(playeridvehicleidispassenger)
{
    return 
1;
}
public 
OnPlayerExitVehicle(playeridvehicleid)
{
    return 
1;
}
public 
OnPlayerStateChange(playeridnewstateoldstate)
{
    return 
1;
}
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);
    
SetTimerEx("OnPlayerEnterStreamedCheckpoint",20000,false,"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;
}
stock DestroyCheckpoint(CPiD//Destory's a checkpoint
{
    
CPDisabled[CPiD] = 1;
    for(new 
iiMAX_PLAYERSi++)
    {
      if(
PlayerCP[i] == CPiD)
      {
        
DisablePlayerCheckpoint(i);
      }
    }
}
stock TogglePlayerCheckpoint(playeridCPiDtoggled//Toggles a checkpoint for a player 0 = Not active, 1 = active :)
{
  
CPActive[playerid][CPiD] = toggled;
}
public 
OnPlayerLeaveCheckpoint(playerid)
{
    return 
1;
}
public 
OnPlayerEnterRaceCheckpoint(playerid)
{
    return 
1;
}
public 
OnPlayerLeaveRaceCheckpoint(playerid)
{
    return 
1;
}
public 
OnRconCommand(cmd[])
{
    return 
1;
}
public 
OnPlayerRequestSpawn(playerid)
{
    return 
1;
}
public 
OnObjectMoved(objectid)
{
    return 
1;
}
public 
OnPlayerObjectMoved(playeridobjectid)
{
    return 
1;
}
public 
OnPlayerPickUpPickup(playeridpickupid)
{
    return 
1;
}
public 
OnVehicleMod(playeridvehicleidcomponentid)
{
    return 
1;
}
public 
OnVehiclePaintjob(playeridvehicleidpaintjobid)
{
    return 
1;
}
public 
OnVehicleRespray(playeridvehicleidcolor1color2)
{
    return 
1;
}
public 
OnPlayerSelectedMenuRow(playeridrow)
{
    return 
1;
}
public 
OnPlayerExitedMenu(playerid)
{
    return 
1;
}
public 
OnPlayerInteriorChange(playeridnewinterioridoldinteriorid)
{
    return 
1;
}
public 
OnPlayerKeyStateChange(playeridnewkeysoldkeys)
{
    return 
1;
}
public 
OnRconLoginAttempt(ip[], password[], success)
{
    return 
1;
}
public 
OnPlayerUpdate(playerid)
{
    return 
1;
}
public 
OnPlayerStreamIn(playeridforplayerid)
{
    return 
1;
}
public 
OnPlayerStreamOut(playeridforplayerid)
{
    return 
1;
}
public 
OnVehicleStreamIn(vehicleidforplayerid)
{
    return 
1;
}
public 
OnVehicleStreamOut(vehicleidforplayerid)
{
    return 
1;
}
public 
OnDialogResponse(playeriddialogidresponselistiteminputtext[])
{
    return 
1;
}
public 
OnPlayerClickPlayer(playeridclickedplayeridsource)
{
    return 
1;
}
stock GiveTeamScore(teamidscore// Try this code
{
    for(new 
iMAX_PLAYERSi++)
    {
        if(
gTeam[i] == teamid)
        {
            
SetPlayerScore(iGetPlayerScore(i) + score);
        }
    }
}
stock SendTeamMessage(colorstring[],team)
{
    for(new 
0MAX_PLAYERSi++)
    {
        if(
IsPlayerConnected(i))
        {
            if(
gTeam[i] == team)
            {
                
SendClientMessage(icolorstring);
            }
        }
    }

can someone help me Please
Reply
#2

You should use Toribio's Progressbar include (http://forum.sa-mp.com/showthread.ph...rogressbar.inc), it contains useful functions you can use for it.
Reply
#3

how dude ?? give me please your msn or enithing for help me please if you want
Reply
#4

guys some help here please
Reply
#5

Read the topic I linked, try to insert the functions into your script and use them. If you still have problem after that, I'll write you a script like you shown.
Reply
#6

dude please give me your msn or enything for teach me please
Reply
#7

BlackXstory, Nonameman gave u a very usefull link, Go check it out before begging for more
Reply
#8

thx but i need some one for teach me can you add me in your msn for teach me please
Reply
#9

ok some fix my probleme [in the pecture] [""3""]
Reply
#10

Use a variable when they enter the checkpoint do something like
pawn Код:
insidecp[playerid] = 1;
if(insidecp[playerid] == 1)
{
     //capture code
}
when they exit do
pawn Код:
insidecp[playerid] = 0;
and when they exit
pawn Код:
TogglePlayerCheckpoint...
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)