05.06.2015, 20:20
Hi these cods for hitman's contract
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
PHP код:
if(strcmp(cmd, "/contract", true) == 0)
{
if(PINFO[playerid][pMember] == 8 || 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] == 8 || 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;
}
thanks