Help me pls
#1

Bro, How to FIx it in CNR?
Pls help or contac me in fb : https://www.********.com/bloodyninja555
realesed time eror, (minus)





PHP код:
CMD:robplayeridparams[ ] )
{
    if ( 
PlayerInfoplayerid ][ ActionID ] != )     return SendClientMessageplayeridCOLOR_ULTRARED,"{FF0000}ERROR: {C8C8C8}You must be a robber while in a /CnR minigame to use this command!");
    if ( 
GetPlayerTeamplayerid ) != TEAM_ROBBERS && GetPlayerTeamplayerid ) != TEAM_PROROBBERS && GetPlayerTeamplayerid ) != TEAM_EROBBERS )     return SendClientMessage(playerid,-1,"{FF0000}ERROR: {C8C8C8}You must be a robber in CnR to use this command!");
    if ( 
IsPlayerInAnyVehicleplayerid ) ) return SendClientMessageplayeridCOLOR_ULTRARED,"{FF0000}ERROR: {C8C8C8}You must be on foot to commit robberies.");
    if ( 
Robstartplayerid ] == 1  )
    {
        if( 
RobOnplayerid ] == )                     return SendClientMessageplayeridCOLOR_ULTRARED,"{FF0000}ERROR: {C8C8C8}You have recently robbed a shop, you can only rob a store once every 2 minutes.");
        
TogglePlayerControllable(playerid,1);
        
robberytime=25;
        
robberytiming SetTimerEx("Robberytimer",1000,1,"i",playerid);
        
TextDrawShowForPlayer(playeridRobTD);
        
SendClientMessageplayeridCOLOR_ULTRARED,""BLUE_"Server: {DB881A}You have started a robbery, the cops have been notified!");
        foreach( 
Player)
        {
                if ( 
GetPlayerTeam) == TEAM_COPS || GetPlayerTeam) == TEAM_ARMY || GetPlayerTeam) == TEAM_SWAT )
                {
                    if ( 
GetPlayerTeamplayerid ) == TEAM_ROBBERS )
                    {
                        
formatgsStringsizeofgsString ), "{004BFF}COP RADIO: {15D4ED}Suspect %s(%i) has started a robbery at the %s in %s. Units respond!"PlayerNameplayerid ), playerid,PlayerInfoplayerid ][ ShopRobbed ],PlayerInfoplayerid ][ Zone ]);
                        
SendClientMessageiCOLOR_ULTRARED,gsString);
                    }
                    if ( 
GetPlayerTeamplayerid ) == TEAM_PROROBBERS )
                    {
                        
formatgsStringsizeofgsString ), "{004BFF}COP RADIO: {15D4ED}Suspect %s(%i) has started a robbery at the %s in %s. Units respond!"PlayerNameplayerid ), playerid,PlayerInfoplayerid ][ ShopRobbed ],PlayerInfoplayerid ][ Zone ]);
                        
SendClientMessageiCOLOR_ULTRARED,gsString);
                    }
                    if ( 
GetPlayerTeamplayerid ) == TEAM_EROBBERS )
                    {
                        
formatgsStringsizeofgsString ), "{004BFF}COP RADIO: {15D4ED}Suspect %s(%i) has started a robbery at the %s in %s. Units respond!"PlayerNameplayerid ), playerid,PlayerInfoplayerid ][ ShopRobbed ],PlayerInfoplayerid ][ Zone ]);
                        
SendClientMessageiCOLOR_ULTRARED,gsString);
                    }
                }
        }
        
ApplyAnimationplayerid"SHOP""ROB_Loop_Threat"4.01000);
        
RobOnplayerid ] = ( );
        
SetTimerEx"RobTimmer"1200000"i"playerid );
        
SetPlayerAttachedObjectplayerid01550150.0164910.205742, -0.2084980.0000000.0000000.0000001.0000001.0000001.000000 ); // Money Bag
    
}
    else
    {
        new 
id=-255Float:x,Float:y,Float:z;
        if ( 
PlayerInfoplayerid ][ ActionID ] != )     return SendClientMessageplayeridCOLOR_ULTRARED,"{FF0000}ERROR: {C8C8C8}You must be a robber while in a /CnR minigame to use this command!");
        if ( 
GetPlayerTeamplayerid ) != TEAM_ROBBERS && GetPlayerTeamplayerid ) != TEAM_PROROBBERS && GetPlayerTeamplayerid ) != TEAM_EROBBERS )     return InfoTD_MSGplayerid5000"You're not a ~r~~h~Robber ~w~~h~from ~g~~h~CNR" );
        
GetPlayerPos(playerid,x,y,z);
        if(!
isnull(params))
        {
          
sscanf(params"u"id);
             if(!
IsPlayerConnected(id))  return SendClientMessage(playeridRED" "RED_"» Error « {BABABA}» Error « {BABABA}This player is not connected");
          else if(
id == playerid)  SendClientMessage(playerid,RED," "RED_"» Error « {BABABA}You can't rob yourself!");
          else
          {
             if(
IsPlayerInRangeOfPoint(id,4.00,x,y,z)) robplayer(playerid,id);
             else 
SendClientMessage(playerid,RED," "RED_"» Error « {BABABA}This player is too far away from you!");
          }
        }
        else
        {
           foreach (new 
Player)
           {
              if(
IsPlayerInRangeOfPoint(i,4.00,x,y,z) && != playerid)
              {
                  
id=i;
                  break;
              }
           }
           if(
id == -255SendClientMessage(playerid,RED,"{FF0000}Server: {778899}No players to rob near you."); else robplayer(playerid,id);
        }
    }
    return 
true;
}
stock robplayer(robber,robbed)
{
    if(
IsPlayerInRangeOfPoint(robber751323.8813,2673.1052,11.2392)) return SendClientMessage(robber,RED," "RED_"» Error « {BABABA}You cannot rob players in robbers spawn place!");
    if ( 
IsPlayerInAnyVehiclerobbed ) )
    return 
SendClientMessagerobberCOLOR_ULTRARED"You can not rob anyone from inside a vehicle." );
    else if ( 
IsPlayerInAnyVehiclerobbed ) )
    return 
SendClientMessagerobberCOLOR_YELLOW"Player with that ID is inside in a vehicle! You can't rob him!" );
    else if ( 
PlayerInforobbed ][ RecentlyRobbed ] == )
    return 
SendClientMessagerobberCOLOR_ULTRARED"That player has been robbed recently. Try again later." );
    if ( 
GetPlayerMoneyrobbed ) > 4999)
    {
        new 
robbedcash;
        
robbedcash random5000 );
        new 
string[128];
        
format(string,sizeof(string),"~w~ROBBED %s~nl~~w~+~g~~h~$%d~w~!",PlayerNamerobbed ),robbedcash);
        
GameTextForPlayer(robber,string,2500,3);
        new 
string2[128];
        
format(string2,sizeof(string2),"~w~%s HAS ROBBED YOU!~nl~~w~~r~-$%d~w~!",PlayerNamerobber ),robbedcash);
        
GameTextForPlayer(robbed,string2,2500,3);
        
GivePlayerMoneyrobberrobbedcash );
        
GivePlayerMoneyrobbed, -robbedcash );
        
PlayerInforobbed ][ RecentlyRobbed ] = 1;
        
SetTimerEx"ResetRobVariable"1000000"i"robbed );
        
PlayerInforobber ][ PlayerRobberies]++;
        
GiveMedal(robber,26);
    }
    else if ( 
GetPlayerMoneyrobbed ) < 4999 )
    {
        
gsString] = EOS;
        
formatgsStringsizeofgsString ), "%s[ID:%d] don't have enough money for rob."PlayerNamerobbed ), robbed );
        return 
SendClientMessagerobberCOLOR_ULTRAREDgsString );
    }
      return 
1;
}
forward Robberytimer(playerid);
public 
Robberytimer(playerid)
{
        new 
srv_string2256 ];
        
formatsrv_string2sizeofsrv_string2 ), "~b~ROBBERY IN PROGRESS ~nl~~w~STAY IN THE STORE ~nl~~r~%d ~w~SECONDS LEFT.",robberytime);
        
TextDrawSetStringRobTDsrv_string2 );
         
robberytime--;
        if(
robberytime == 0)
        {
            
KillTimer(robberytiming);
            
TextDrawHideForPlayer(playeridRobTD);
            
donerob(playerid);
        }
}
forward Jailtimer(playerid);
public 
Jailtimer(playerid)
{
        
gsString] = EOS;
        
formatgsStringsizeofgsString ), "~b~You will be released in %d seconds.~nl~~w~Type /escape to attempt to escape"cnrjail );
        
InfoTD_MSGplayerid2000gsString );
         
cnrjail--;
        if(
cnrjail == 0)
        {
            
KillTimer(cnrjailtiming);
            
JailReleasecnr(playerid);
        }
}
forward Spawntimer(playerid);
public 
Spawntimer(playerid)
{
        new 
srv_string2256 ];
        
formatsrv_string2sizeofsrv_string2 ), "You will respawn in ~y~%d ~w~Seconds.",spawntime);
        
TextDrawSetStringKillerTD8srv_string2 );
          
spawntime--;
        if(
spawntime == 0)
        {
            
KillTimer(spawntiming);
            
spawntiming=-1;
        }
}
forward donerob(playerid);
public 
donerob(playerid)
{
    switch( 
random) )
    {
        case 
0:
        {
            
ClearAnimations(playerid);
              
GameTextForPlayer(playerid,"~r~ROBBERY FAILED",1000,5);
              
SendClientMessage(playerid,RED,""R"- "GRI"CnR "R"- "ORANGE_"You have failed the robbery and got away with nothing,the cops have been notified.");
        }
        case 
1:
        {
            
ClearAnimations(playerid);
            
PlayerInfoplayerid ][ Robberies]++;
            
GiveMedal(playerid,25);
            if ( 
GetPlayerTeamplayerid ) == TEAM_ROBBERS )
            {
                if ( 
PlayerInfo playerid ][ pVip ] >= 2)
                {
                    
GameTextForPlayer(playerid,"You have Robbed ~g~$30000",1000,5);
                    
GivePlayerMoneyplayerid 30000 );
                    
SendClientMessageplayeridCOLOR_ULTRARED,"{FF0000}NFS {7A7A7A}»{DBED15} {DB881A}You have successfully completed the robbery and got away with {00FF00}$30,000");
                }
                else
                {
                    
GameTextForPlayer(playerid,"You have Robbed ~g~$15000",1000,5);
                    
GivePlayerMoneyplayerid 15000 );
                    
SendClientMessageplayeridCOLOR_ULTRARED,"{FF0000}NFS {7A7A7A}»{DBED15} {DB881A}You have successfully completed the robbery and got away with {00FF00}$15,000");
                }
            }
            if ( 
GetPlayerTeamplayerid ) == TEAM_PROROBBERS )
            {
                if ( 
PlayerInfo playerid ][ pVip ] >= 2)
                {
                    
GameTextForPlayer(playerid,"You have Robbed ~g~$50000",1000,5);
                    
GivePlayerMoneyplayerid 50000 );
                    
SendClientMessageplayeridCOLOR_ULTRARED,"{FF0000}NFS {7A7A7A}»{DBED15} {DB881A}You have successfully completed the robbery and got away with {00FF00}$50,000");
                }
                else
                {
                    
GameTextForPlayer(playerid,"You have Robbed ~g~$25000",1000,5);
                    
GivePlayerMoneyplayerid 25000 );
                    
SendClientMessageplayeridCOLOR_ULTRARED,"{FF0000}NFS {7A7A7A}»{DBED15} {DB881A}You have successfully completed the robbery and got away with {00FF00}$25,000");
                }
            }
            if ( 
GetPlayerTeamplayerid ) == TEAM_EROBBERS )
            {
                if ( 
PlayerInfo playerid ][ pVip ] >= 2)
                {
                    
GameTextForPlayer(playerid,"You have Robbed ~g~$70000",1000,5);
                    
GivePlayerMoneyplayerid 70000 );
                    
SendClientMessageplayeridCOLOR_ULTRARED,"{FF0000}NFS {7A7A7A}»{DBED15} {DB881A}You have successfully completed the robbery and got away with {00FF00}$70,000");
                }
                else
                {
                    
GameTextForPlayer(playerid,"You have Robbed ~g~$35000",1000,5);
                    
GivePlayerMoneyplayerid 35000 );
                    
SendClientMessageplayeridCOLOR_ULTRARED,"{FF0000}NFS {7A7A7A}»{DBED15} {DB881A}You have successfully completed the robbery and got away with {00FF00}$35,000");
                }
            }
            foreach( 
Player)
            {
                if( 
PlayerInfo][ InCNR] == )
                {
                    if ( 
GetPlayerTeamplayerid ) == TEAM_ROBBERS )
                    {
                        if ( 
PlayerInfo playerid ][ pVip ] >= 2)
                        {
                            
formatgsStringsizeofgsString ), "{7A7A7A}[CnR] {87CEFA}%s(%i) has robbed the %s in %s and got away with {00FF00}$30,000"PlayerNameplayerid ),playerid,PlayerInfoplayerid ][ ShopRobbed ],PlayerInfoplayerid ][ Zone ]);
                            
SendClientMessageiCOLOR_ULTRARED,gsString);
                        }
                        else
                        {
                            
formatgsStringsizeofgsString ), "{7A7A7A}[CnR] {87CEFA}%s(%i) has robbed the %s in %s and got away with {00FF00}$15,000"PlayerNameplayerid ),playerid,PlayerInfoplayerid ][ ShopRobbed ],PlayerInfoplayerid ][ Zone ]);
                            
SendClientMessageiCOLOR_ULTRARED,gsString);
                        }
                    }
                    if ( 
GetPlayerTeamplayerid ) == TEAM_PROROBBERS )
                    {
                        if ( 
PlayerInfo playerid ][ pVip ] >= 2)
                        {
                            
formatgsStringsizeofgsString ), "{7A7A7A}[CnR] {87CEFA}%s(%i) has robbed the %s in %s and got away with {00FF00}$50,000"PlayerNameplayerid ),playerid,PlayerInfoplayerid ][ ShopRobbed ],PlayerInfoplayerid ][ Zone ]);
                            
SendClientMessageiCOLOR_ULTRARED,gsString);
                        }
                        else
                        {
                            
formatgsStringsizeofgsString ), "{7A7A7A}[CnR] {87CEFA}%s(%i) has robbed the %s in %s and got away with {00FF00}$25,000"PlayerNameplayerid ),playerid,PlayerInfoplayerid ][ ShopRobbed ],PlayerInfoplayerid ][ Zone ]);
                            
SendClientMessageiCOLOR_ULTRARED,gsString);
                        }
                    }
                    if ( 
GetPlayerTeamplayerid ) == TEAM_EROBBERS )
                    {
                        if ( 
PlayerInfo playerid ][ pVip ] >= 2)
                        {
                            
formatgsStringsizeofgsString ), "{7A7A7A}[CnR] {87CEFA}%s(%i) has robbed the %s in %s and got away with {00FF00}$70,000"PlayerNameplayerid ),playerid,PlayerInfoplayerid ][ ShopRobbed ],PlayerInfoplayerid ][ Zone ]);
                            
SendClientMessageiCOLOR_ULTRARED,gsString);
                        }
                        else
                        {
                            
formatgsStringsizeofgsString ), "{7A7A7A}[CnR] {87CEFA}%s(%i) has robbed the %s in %s and got away with {00FF00}$35,000"PlayerNameplayerid ),playerid,PlayerInfoplayerid ][ ShopRobbed ],PlayerInfoplayerid ][ Zone ]);
                            
SendClientMessageiCOLOR_ULTRARED,gsString);
                        }
                    }
                }
            }
        }
    }
    return 
1;

Reply


Messages In This Thread
Help me pls - by DandyCorleone - 11.09.2016, 14:47
Re: Help me pls - by Quinncell - 11.09.2016, 14:49
Re: Help me pls - by DandyCorleone - 11.09.2016, 14:51
Re: Help me pls - by DandyCorleone - 12.09.2016, 02:01
Re: Help me pls - by Calgon - 12.09.2016, 03:06
Re: Help me pls - by XHunterZ - 12.09.2016, 04:24

Forum Jump:


Users browsing this thread: 5 Guest(s)