Problem With Leavehit
#1

Hi my Leavehit for hitman has a bug when hitman use it then use mycontract show hit contract but should say you are not on hit or ...
that mean Leavehit not work

this is cods of it
PHP код:
        else if(!strcmp(cmd,"Leavehit",true))
        {
            if(
AgentContractID[playerid] == INVALID_PLAYER_ID) {SCM(playerid,COLOR_ALI,"You are not on duty(gethit)."); return 0;}
            if(
AgentHitID[playerid] == INVALID_PLAYER_ID)
            {
                
AgentContractIDUsed[AgentContractID[playerid]] = false;
                
AgentContractID[playerid] = INVALID_PLAYER_ID;
                
AgentHitID[playerid] = INVALID_PLAYER_ID;
            }
            else
            {
                
AgentContractIDUsed[AgentContractID[playerid]] = false;
                
AgentContractID[playerid] = INVALID_PLAYER_ID;
                
ContractsCount ++;
                
ContractID[AgentHitID[playerid]] = ReturnContractID();
                
ContractIDUsed[ReturnContractID()] = true;
                
AgentHiterID[AgentHitID[playerid]] = INVALID_PLAYER_ID;
                
AgentHitID[playerid] = INVALID_PLAYER_ID;
            }
            
SCM(playerid,COLOR_ALI,"You have leaved from hit duty successfully.");
            return 
0;
        } 
Reply
#2

You should show us your /mycontract command too.
Reply
#3

Quote:
Originally Posted by [DOG]irinel1996
Посмотреть сообщение
You should show us your /mycontract command too.
PHP код:
        else if(!strcmp(cmd,"MyContract",true))
        {
            if(
AgentHitID[playerid] == INVALID_PLAYER_ID) {SCM(playerid,COLOR_ALI,"You haven't any contract."); return 0;}
            new 
strbitch[256];
            
format(strbitch,256,"Your contract is %s(%i)",PINFO[AgentHitID[playerid]][pName],AgentHitID[playerid]);
            
SCM(playerid,COLOR_HITMAN,strbitch);
            return 
0;
        }
        else if(!
strcmp(cmd,"Gethit",true))
        {
            if(
AgentHitID[playerid] != INVALID_PLAYER_ID) {SCM(playerid,COLOR_ALI,"You already on gethiting, please wait ..."); return 0; }
            if(
PINFO[playerid][pGetHitTime] > 0) {format(string,sizeof string,"You must wait for %i minutes.",PINFO[playerid][pGetHitTime]); SCM(playerid,COLOR_HITMAN,string); return 0;}
            if(
AgentContractID[playerid] != INVALID_PLAYER_ID) {SCM(playerid,COL_SYN,"You already on duty."); return 0;}
            
AgentHitID[playerid] = INVALID_PLAYER_ID;
            
AgentContractID[playerid] = ReturnAgentID();
            
AgentContractIDUsed[ReturnAgentID()] = true;
            
SCM(playerid,COLOR_HITMAN,"You go on duty with your Hitman job.");
            return 
0;
        } 
Reply
#4

Replace /mycontract with this one:
pawn Код:
else if(!strcmp(cmd,"MyContract",true))
        {
            if(AgentContractID[playerid] == INVALID_PLAYER_ID) {SCM(playerid,COLOR_ALI,"You are not on duty(gethit)."); return 0;}
            if(AgentHitID[playerid] == INVALID_PLAYER_ID) {SCM(playerid,COLOR_ALI,"You haven't any contract."); return 0;}
            new strbitch[256];
            format(strbitch,256,"Your contract is %s(%i)",PINFO[AgentHitID[playerid]][pName],AgentHitID[playerid]);
            SCM(playerid,COLOR_HITMAN,strbitch);
            return 0;
        }
Best regards.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)