DOF2 doesn't effect
#1

PHP код:
CMD:paytime(playerid,params[]){
LoggedCMD SAdminCMD
for(new 0MAX_PLAYERSi++){
DOF2_SetInt(pFile(i),"Bank",DOF2_GetInt(pFile(i),"Bank")+DOF2_GetInt(pFile(i),"Payment"));
DOF2_SetInt(pFile(i),"Bank",DOF2_GetInt(pFile(i),"Bank")+DOF2_GetInt(pFile(i),"FPayment"));
DOF2_SetFloat(pFile(i),"Interests",DOF2_GetFloat(pFile(i),"InterestsRate")*DOF2_GetInt(pFile(i),"Bank"));
DOF2_SetInt(pFile(i),"Bank",DOF2_GetInt(pFile(i),"Bank")+DOF2_GetInt(pFile(i),"Interests"));
MSG(i,C_SEA,"======================================================================");
MSG(i,C_YELLOW,"~ PayTime ~");
format(String,sizeof(String),"Payment: $%s",Comma(DOF2_GetInt(pFile(i),"Payment")));
MSG(i,C_DEFAULT,String);
format(String,sizeof(String),"Faction Payment: $%s",Comma(DOF2_GetInt(pFile(i),"FPayment")));
MSG(i,C_DEFAULT,String);
format(String,sizeof(String),"Interests: $%s",Comma(DOF2_GetInt(pFile(i),"Interests")));
MSG(i,C_DEFAULT,String);
format(String,sizeof(String),"Bank Balance: $%s",Comma(DOF2_GetInt(pFile(i),"Bank")));
MSG(i,C_DEFAULT,String);
MSG(i,C_SEA,"======================================================================");
DOF2_SetInt(pFile(i),"Payment",150);
format(String,sizeof(String),"Factions/%s",DOF2_GetInt(pFile(i),"Faction"));
DOF2_SetInt(String,"Bank",DOF2_GetInt(String,"Bank")-DOF2_GetInt(pFile(i),"FPayment"));
DOF2_SetInt(pFile(i),"RPoints",DOF2_GetInt(pFile(i),"RPoints")+1);
if(
DOF2_GetInt(pFile(i),"RPoints")>=DOF2_GetInt(pFile(i),"RPointsMax")){
DOF2_SetInt(pFile(i),"RPoints",0);
DOF2_SetInt(pFile(i),"RPointsMax",DOF2_GetInt(pFile(i),"RPointsMax")+2);
DOF2_SetInt(pFile(i),"Level",DOF2_GetInt(pFile(i),"Level")+1);
format(String,sizeof(String),"[Level UP] {77ff77}Congratulations! You've leveled up to level %s",Comma(DOF2_GetInt(pFile(i),"Level")));
MSG(i,C_GREEN,String);}
}
return 
1;} 
after i use the paytime command it's doing everything right except from the taking cash from the faction bank it's just stays the same
PHP код:
format(String,sizeof(String),"Factions/%s",DOF2_GetInt(pFile(i),"Faction"));
DOF2_SetInt(String,"Bank",DOF2_GetInt(String,"Bank")-DOF2_GetInt(pFile(i),"FPayment")); 
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)