[Robing Not Start :(]
#1

Hello
Guys My Robing Not Start
im Write /robbank
The Robing not start
why ?
PHP код:
CMD:robbank(playeridparams[])
{
    if(
robpossible == 1)
    {
        if ( !
IsPlayerInDynamicCPplayerid,cp_GymSeven ) )
        {
            
robpossible 0;
            
SetTimer("waittimer"30000false);
            
SetTimer("robtimer"240000false);
            
SendClientMessage(playeridCOLOR_WHITE"You gotta stay 30 sec in the bank in order to rob it!");
         }
    } else {
        
SendClientMessage(playeridCOLOR_WHITE"You can't rob the bank right now!");
    }
    return 
1;

Reply
#2

Did you set "robpossible" to 1, is the player on the checkpoint? Show us your timers.
Reply
#3

Quote:
Originally Posted by PaulDinam
Посмотреть сообщение
Did you set "robpossible" to 1, is the player on the checkpoint? Show us your timers.
PHP код:
public waittimer()
{
    
robpossible 1;
    
SendClientMessageToAll(COLOR_WHITE"The bank is now available for robbery!");

full code
PHP код:
#include <a_samp>
#include <Streamer>
#include <zcmd>
#define COLOR_WHITE 0xFFFFFFAA
#define COLOR_GREEN 0x33AA33AA
#define COLOR_TWBLUE 0x0000FFAA
forward robtimer(playerid);
forward waittimer();
new 
robpossible;
new 
cp_GymSeven;
public 
OnFilterScriptInit()
{
    
robpossible 1;
    return 
1;
}
public 
OnGameModeInit()
{
    
cp_GymSeven CreateDynamicCP(-23.4826,-55.6319,1003.54693.0, .interiorid 6);
    return 
1;
}
CMD:robbank(playeridparams[])
{
    if(
robpossible == 1)
    {
        if ( !
IsPlayerInDynamicCPplayerid,cp_GymSeven ) )
        {
            
robpossible 0;
            
SetTimer("waittimer"30000false);
            
SetTimer("robtimer"240000false);
            
SendClientMessage(playeridCOLOR_WHITE"You gotta stay 30 sec in the bank in order to rob it!");
         }
    } else {
        
SendClientMessage(playeridCOLOR_WHITE"You can't rob the bank right now!");
    }
    return 
1;
}
public 
robtimer(playerid)
{
        if(!
IsPlayerInRangeOfPoint(playerid4.0, -104.1407,-22.6708,1000.7188))
        {
         
SendClientMessage(playerid, -1"You failed to rob the bank!");
         return 
1;
        }
        new 
string[128];
        new 
cash random(200000);
        
GivePlayerMoney(playeridcash);
        
format(stringsizeof(string), "You have successfully robbed $%d from the bank!"cash);
        
SendClientMessage(playeridCOLOR_WHITEstring);
        return 
1;
}
public 
waittimer()
{
    
robpossible 1;
    
SendClientMessageToAll(COLOR_WHITE"The bank is now available for robbery!");

Reply
#4

here you go please tell me if works or not
PHP код:
#include <a_samp>
#include <Streamer>
#include <zcmd>
#define COLOR_WHITE 0xFFFFFFAA
#define COLOR_GREEN 0x33AA33AA
#define COLOR_TWBLUE 0x0000FFAA
forward robtimer(playerid);
forward waittimer();
new 
robpossible;
new 
cp_GymSeven;
public 
OnFilterScriptInit()
{
    
robpossible 0;
    return 
1;
}
public 
OnGameModeInit()
{
    
cp_GymSeven CreateDynamicCP(-23.4826,-55.6319,1003.54693.0, .interiorid 6);
    return 
1;
}
CMD:robbank(playeridparams[])
{
    if(
robpossible == 0)
    {
        if ( !
IsPlayerInDynamicCPplayerid,cp_GymSeven ) )
        {
            
robpossible 1;
            
SetTimer("waittimer"30000false);
            
SetTimer("robtimer"240000false);
            
SendClientMessage(playeridCOLOR_WHITE"You gotta stay 30 sec in the bank in order to rob it!");
         }
    } else {
        
SendClientMessage(playeridCOLOR_WHITE"You can't rob the bank right now!");
    }
    return 
1;
}
public 
robtimer(playerid)
{
        if(!
IsPlayerInRangeOfPoint(playerid4.0, -104.1407,-22.6708,1000.7188))
        {
         
SendClientMessage(playerid, -1"You failed to rob the bank!");
         return 
1;
        }
        new 
string[128];
        new 
cash random(200000);
        
GivePlayerMoney(playeridcash);
        
format(stringsizeof(string), "You have successfully robbed $%d from the bank!"cash);
        
SendClientMessage(playeridCOLOR_WHITEstring);
        return 
1;
}
public 
waittimer()
{
    
robpossible 0;
    
SendClientMessageToAll(COLOR_WHITE"The bank is now available for robbery!");

Reply
#5

SetTimer("waittimer", 30000, false);
Place this under GameModeInit.
Reply
#6

Quote:
Originally Posted by Diti1
Посмотреть сообщение
here you go please tell me if works or not
PHP код:
#include <a_samp>
#include <Streamer>
#include <zcmd>
#define COLOR_WHITE 0xFFFFFFAA
#define COLOR_GREEN 0x33AA33AA
#define COLOR_TWBLUE 0x0000FFAA
forward robtimer(playerid);
forward waittimer();
new 
robpossible;
new 
cp_GymSeven;
public 
OnFilterScriptInit()
{
    
robpossible 0;
    return 
1;
}
public 
OnGameModeInit()
{
    
cp_GymSeven CreateDynamicCP(-23.4826,-55.6319,1003.54693.0, .interiorid 6);
    return 
1;
}
CMD:robbank(playeridparams[])
{
    if(
robpossible == 0)
    {
        if ( !
IsPlayerInDynamicCPplayerid,cp_GymSeven ) )
        {
            
robpossible 1;
            
SetTimer("waittimer"30000false);
            
SetTimer("robtimer"240000false);
            
SendClientMessage(playeridCOLOR_WHITE"You gotta stay 30 sec in the bank in order to rob it!");
         }
    } else {
        
SendClientMessage(playeridCOLOR_WHITE"You can't rob the bank right now!");
    }
    return 
1;
}
public 
robtimer(playerid)
{
        if(!
IsPlayerInRangeOfPoint(playerid4.0, -104.1407,-22.6708,1000.7188))
        {
         
SendClientMessage(playerid, -1"You failed to rob the bank!");
         return 
1;
        }
        new 
string[128];
        new 
cash random(200000);
        
GivePlayerMoney(playeridcash);
        
format(stringsizeof(string), "You have successfully robbed $%d from the bank!"cash);
        
SendClientMessage(playeridCOLOR_WHITEstring);
        return 
1;
}
public 
waittimer()
{
    
robpossible 0;
    
SendClientMessageToAll(COLOR_WHITE"The bank is now available for robbery!");

still not working

PaulDinam
i get error when im paste it under gamemodeint
Reply
#7

Код:
#include <a_samp> 
#include <Streamer> 
#include <zcmd> 

#define COLOR_WHITE 0xFFFFFFAA 
#define COLOR_GREEN 0x33AA33AA 
#define COLOR_TWBLUE 0x0000FFAA 

forward robtimer(playerid); 
forward waittimer(); 

new robpossible; 
new cp_GymSeven; 


public OnFilterScriptInit() 
{ 
    robpossible = 1; 
    return 1; 
} 
public OnGameModeInit() 
{ 
    cp_GymSeven = CreateDynamicCP(-23.4826,-55.6319,1003.5469, 3.0, .interiorid = 6); 
    return 1; 
} 
CMD:robbank(playerid, params[]) 
{ 
    if(robpossible == 1) 
    { 
        if (IsPlayerInDynamicCP( playerid,cp_GymSeven ) ) 
        { 
            robpossible = 0; 
            SetTimer("waittimer", 30000, false); 
            SetTimer("robtimer", 240000, false); 

            SendClientMessage(playerid, COLOR_WHITE, "You gotta stay 30 sec in the bank in order to rob it!"); 
         } 
    } 
   else 
    { 
        SendClientMessage(playerid, COLOR_WHITE, "You can't rob the bank right now!"); 
    } 
    return 1; 
} 

public robtimer(playerid) 
{ 
        if(!IsPlayerInRangeOfPoint(playerid, 4.0, -104.1407,-22.6708,1000.7188)) 
        { 
         SendClientMessage(playerid, -1, "You failed to rob the bank!"); 
         return 1; 
        } 
        new string[128]; 
        new cash = random(200000); 
        GivePlayerMoney(playerid, cash); 

        format(string, sizeof(string), "You have successfully robbed $%d from the bank!", cash); 
        SendClientMessage(playerid, COLOR_WHITE, string); 
        return 1; 
} 

public waittimer() 
{ 
    robpossible = 1; 
    SendClientMessageToAll(COLOR_WHITE, "The bank is now available for robbery!"); 
}
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)