Help to fix my problem
#1

Hi these cods for hitman's contract


PHP код:
    if(strcmp(cmd"/contract"true) == 0)
    {
        if(
PINFO[playerid][pMember] == || PINFO[playerid][pLeader] == 8) return SCM(playerid,COLOR_ALI,"You can't use contract when you are a hitman agent.");
        if(
PINFO[playerid][pLevel] < 3) return SCM(playerid,COL_SYN,"You need to have higher than 3 level to place a contract.");
        
tmp strtok(cmdtext,idx);
        if(!
strlen(tmp)) return SCM(playerid,COL_SYN,"Syntax: /contract <PlayerID/PartOfName> <Prize>");
        new 
taraf ReturnUser(tmp);
        if(!
IsPlayerConnected(taraf)) return SCM(playerid,COLOR_ALI,"That player is offline.");
        if(
PINFO[taraf][pMember] == || PINFO[taraf][pLeader] == 8) return SCM(playerid,COLOR_ALI,"You cannot contract a hitman agent.");
        
tmp strtok(cmdtext,idx);
        if(!
strlen(tmp)) return SCM(playerid,COL_SYN,"Syntax: /contract <PlayerID/PartOfName> <Prize>");
        new 
prize strval(tmp);
        if(
prize 500 || prize 10000) return SCM(playerid,COLOR_ALI,"Type a Prize number between $500 and $10,000");
        if(
prize GetPlayerPool(playerid)) return SCM(playerid,COLOR_ALI,"You haven't this cash.");
        if(
prize 3500 && gTeam[taraf] == TEAM_COP) return SCM(playerid,COLOR_ALI,"The cash to contract a cop must be higher than $3,500.");
        
GivePlayerPool(playerid,-prize);
        if(
PINFO[taraf][pHeadValue] <= 0)
        {
            
ContractsCount ++;
            
ContractID[taraf] = ReturnContractID();
            
ContractIDUsed[ReturnContractID()] = true;
            
AgentHiterID[taraf] = INVALID_PLAYER_ID;
        }
        
PINFO[taraf][pHeadValue] += prize;
        
SaveKonVal(taraf"pHeadValue"PINFO[taraf][pHeadValue]);
        
SCM(playerid,COLOR_ALI,"Player get contracted successfully.");
        return 
1;
    } 
with this code any body can contract a person for any times they can i need i cod for example i want contract some one i do it but if i want contract that person again i cant do it since after 24 hour or 12 hour.


thanks
Reply


Messages In This Thread
Help to fix my problem - by keyvanik - 05.06.2015, 20:20
Re: Help to fix my problem - by Nubik - 05.06.2015, 20:41
Re: Help to fix my problem - by keyvanik - 05.06.2015, 21:01
Re: Help to fix my problem - by keyvanik - 06.06.2015, 06:22
Re: Help to fix my problem - by Dangjai - 06.06.2015, 06:27
Re: Help to fix my problem - by keyvanik - 06.06.2015, 07:09

Forum Jump:


Users browsing this thread: 3 Guest(s)