Ayuda con Sistema de Payday
#1

Hola, me pasaron un GM (zenon city)creo que es.. Y me gusto mucho, estoy aprendiendo con el, edito lo abro lo pruebo, y esas cosas... Pero me di cuenta que el paycheck/payday no paga...

Es decir, estoy en la faccion que sea, y dice PAGO:0$

Hay un archivo llamado "factionpay.cfg" y esta con valores asi:
Код:
0|500|1000|1500|2300|3000|15000
0|1000|2500|3000|3500|4000|15000
0|1300|1800|2200|3100|3800|15000
0|1200|1500|2100|2800|3600|11000
0|1100|1500|2000|2700|3100|20000
0|2000|2500|3000|3500|4000|13000
0|1000|2000|3000|4000|5000|8000
supongo que es de los pagos, pero de todos modos NO PAGA!!!!

Y la verdad no se como solucionarlo y me encantaria hacerlo....

Muchas gracias de antemano.
Reply
#2

Busca la funcion del payday, y postйala , debe ser algъn stock o public.
Reply
#3

Puede que sea esto?
Код:
timer severTimers2[1000](){
	foreach(Player, i){
	    if(IsPlayerConnected(i) && gPlayerLogged{i} == 1){
			if(Info[i][pTimePayDay] >= 0)
			{
			    new string[128];
 				Info[i][pTimePayDay]++;
		    	if(Info[i][pTimePayDay] >= 3600){
 			    	new tmpintrate, interest, paytotal;
		    		    tmpintrate = 1;
		    		interest = (Info[i][pAccount]/1000)*(tmpintrate);
		    		paytotal = Info[i][pPayCheck]-TaxValue;
					if(Info[i][pVIP] == 0 && interest > 50000) interest = 50000;
					else if(Info[i][pVIP] == 1 && interest > 100000) interest = 100000;
					else if(Info[i][pVIP] == 2 && interest > 150000) interest = 150000;
					else if(Info[i][pVIP] == 3 && interest > 200000) interest = 200000;
					else if(Info[i][pVIP] >= 4 && interest > 250000) interest = 250000;
					Info[i][pAccount] += interest;
					if(Info[i][p_Pr_Time] == 10){
					    SendClientMessageEx(i, COLOR_WHITE, "  Ya puedes volver hacer viajes de camionero.");
						Info[i][p_Pr_Time] = 0;
					}
					if(Info[i][pRenting] != INVALID_HOUSE_ID){
						if(HouseInfo[Info[i][pRenting]][hRentFee] > Info[i][pAccount]){
							Info[i][pRenting] = INVALID_HOUSE_ID;
							SendClientMessageEx(i, COLOR_WHITE, "Fuiste desalojado de la casa que rentabas.");
						}
						else{
							HouseInfo[Info[i][pRenting]][hSafeMoney] += HouseInfo[Info[i][pRenting]][hRentFee];
							Info[i][pAccount] -= HouseInfo[Info[i][pRenting]][hRentFee];
						}
					}
					Info[i][pRob] = 0;
					if(Info[i][pVIP] >= 4) Info[i][pVTokens]+= 2;
				    if(Info[i][pDobleExp] == 0){Info[i][pExp] += 1;}
				    else{
						Info[i][pExp] += 2;
						Info[i][pDobleExp]--;
						format(string, sizeof(string), "* Ganaste 2 puntos de respeto por tener horas de doble experiencia, te quedan %d horas mбs.", Info[i][pDobleExp]);
						SendClientMessageEx(i, COLOR_YELLOW, string);
					}
					SendClientMessageEx(i, COLOR_WHITE, 		"* ESTADO DE CUENTA DEL BANCO DE SAN ANDREAS * ");
					format(string, sizeof(string), 				"  Pago:  $%d | Impuestos	: -$%d", Info[i][pPayCheck], TaxValue);
					SendClientMessageEx(i, COLOR_GRAD2, string);
					format(string, sizeof(string), 				"  Interйs ganado: 0.%d por ciento", interest);
					SendClientMessageEx(i, COLOR_GRAD2, string);
                    Info[i][pAccount] += paytotal;
					format(string, sizeof(string), 				"  Total: $%d | N. Balance	: %d$", paytotal, Info[i][pAccount]);
					SendClientMessageEx(i, COLOR_GRAD2, string);
					SendClientMessageEx(i, COLOR_WHITE, 		"-------------------------------------------------");
					GivePlayerCash(i, paytotal);
					Info[i][pPayCheck] = 0;
     				Info[i][pTimePayDay] = 0;
     				Info[i][pConnectTime] += 1;
					RewardPlayer(i);
					OnPlayerSavedStats(i);
					GameTextForPlayer(i, "~y~Pay~n~~w~Check", 5000, 1);
					if(Info[i][pConnectTime] == 2){
						Info[i][pWRestricted] = 0;
						SendClientMessageEx(i, COLOR_GRAD2, "Nota: Cumpliste las 2 horas de juego, la restricciуn de armas fue eliminada");
					}
					if(Info[i][pAdiccion] > 0) Info[i][pAdiccion] -= 2;
					if(Info[i][pWRestricted] > 0){
				    	Info[i][pWRestricted]--;
						if(Info[i][pWRestricted] == 0) SendClientMessageEx(i, COLOR_LIGHTRED, "Tus armas ya no estбn restringidas!");
					}
				}
			}
EDIT:
A la hora del payday me sale esto (siendo Lider de una facc) que me deberia pagar 10.000

Reply
#4

Sн es eso.

Bueno veamos....

la variable "paytotal" es la que determina cuanto dinero recibй el jugar en cada payday.

A su vez, paytotal es igual a Info[i][pPayCheck]-TaxValue;

Revisa, si al momento de ingresar a una faccion (Ya sea por un comando de invitacion, etc) la variable "pPayCheck" cambia, o algo asн, deberнa estar allн tu problema.
Reply
#5

En las variables de Las acc, esta "Paycheck" pero no "pPaycheck", estarнa ahн el problema?

Osea como te dije soy nuevo, en el PWN del GM, esta si pPaycheck, pero si entro en una de las ACC no esta, esta "Paycheck" solo, supongo que ahi me debo de fijar, їO no?

Recapitulemos, creo que entendi lo que me quieres preguntar:
El comando para Asignar el lider de X faccion es asi:
Код:
zcmd(makeleader, playerid, params[])
	{
        if(Info[playerid][pAdminZC] > 1337 || Info[playerid][pFactionModerator] == 1)
		{
		    if(!sscanf(params, "di", params[0], params[1]))
		    {
                new ftext[30];
		        if(params[1] < 0 || params[1] > MAX_FACTION) 		return SendClientMessageEx(playerid, COLOR_GREY, "ID facciуn incorrecto.");
		        if(!IsPlayerConnected(params[0]))                   return SendClientMessageEx(playerid, COLOR_GREY, "Jugado desconectado.");
		        switch(params[1])
		        {
		            case 0: 	{Info[params[0]][pRank] = 0; ftext = "Ninguna"; }
		            case 1: 	{Info[params[0]][pRank] = 6; ftext = "San Andreas Police Department"; }
		            case 2: 	{Info[params[0]][pRank] = 6; ftext = "FBI"; }
		            case 3: 	{Info[params[0]][pRank] = 6; ftext = "San Andreas Ejйrcito Militar"; }
		            case 4: 	{Info[params[0]][pRank] = 6; ftext = "San Andreas Medical Deparment"; }
		            case 5:     {Info[params[0]][pRank] = 6; ftext = "SA News"; }
		            case 6:     {Info[params[0]][pRank] = 6; ftext = "Mecanicos 24/7"; }
		            case 7:     {Info[params[0]][pRank] = 6; ftext = "Gobierno"; }
                    case 8:     {Info[params[0]][pRank] = 6; ftext = "Hitman"; }
                    case 9:     {Info[params[0]][pRank] = 6; ftext = "Sistema Judicial"; }
		        }
		        new string[128];
		        pTazer[params[0]] = 0;
		        Info[params[0]][pLeader] = params[1];
		        Info[params[0]][pMember] = params[1];
		        format(string, sizeof(string), "Administrador %s te asignу el lнder de la facciуn %s.", GetPlayerNameEx(playerid), ftext);
		        SendClientMessageEx(params[0], 0x6ADFFFFF, string);
		        format(string, sizeof(string), "AdmCmdExe: %s asigno lider de la facciуn %s a %s.", GetPlayerNameEx(playerid), ftext, GetPlayerNameEx(params[0]));
				ABroadCast(COLOR_ORANGE, string, 3);
		    }
		    else SendClientMessageEx(playerid, COLOR_GRAD2, "USA: /makeleader [jugador] [facciуn]");
		}
		else SendClientMessageEx(playerid, COLOR_GRAD2, "No autorizado.");
        return 1;
    }
Creo que ahi no edita el valor de Paycheck.


Luego si lo quiero "invitar/contratar"es asi:
Код:
zcmd(contratar, playerid, params[]){
        if(Info[playerid][pLeader] > 0){
            new giveplayerid;
        	if(!sscanf(params, "d", giveplayerid)){
        	    if(IsPlayerConnected(giveplayerid)){
        	        if(ProxDetectorS(8.0, playerid, giveplayerid)){
	            	    if(giveplayerid == playerid) 		return	SendClientMessageEx(playerid, COLOR_GRAD2, "ЎNo puedes invitarte ati mismo!");
	            	    if(Info[giveplayerid][pFMember] < 255)	return	SendClientMessageEx(playerid, COLOR_GRAD2, "ЎNo puedes invitar a una persona que estб en una banda o familia!");
	            	    if(Facturing[giveplayerid] > 0)    return 	SendClientMessageEx(playerid, COLOR_GRAD2, "Este jugador estб en otra tarea, espera.");
	            	    if(Info[giveplayerid][pMember] > 0 || Info[giveplayerid][pLeader] > 0) return 	SendClientMessageEx(playerid, COLOR_GRAD2, "Este jugador ya tiene facciуn.");
						new string[256];
	            	    switch(Info[playerid][pLeader]){
						    case 1: 	ReqF_Name[giveplayerid] = "SA Police Departament";
						    case 2: 	ReqF_Name[giveplayerid] = "FBI";
						    case 3: 	ReqF_Name[giveplayerid] = "San Andreas Ejйrcito Militar";
						    case 4: 	ReqF_Name[giveplayerid] = "SA Medical Department";
						    case 5:     ReqF_Name[giveplayerid] = "Cable News Network";
						    case 6: 	ReqF_Name[giveplayerid] = "Mecanicos 24/7";
						    case 7: 	ReqF_Name[giveplayerid] = "Gobierno SA";
						    case 8: 	ReqF_Name[giveplayerid] = "Hitman";
						}
                        ReqF_Faction[giveplayerid] = Info[playerid][pLeader];
                        Facturing[giveplayerid] = 1;
						format(string, sizeof(string), "\t\tContrato\n\n\t%s te ofrece un contrato en %s\n\tїQuieres aceptarlo y pertenecer a esta organizaciуn?", GetPlayerNameEx(playerid), ReqF_Name[giveplayerid]);
		        		SafeDialogEx(giveplayerid, REQF_ACCEPT, DIALOG_STYLE_MSGBOX, "Contrato de Trabajo", string, "Aceptar", "Rechazar");
	            	}else SendClientMessageEx(playerid, COLOR_GRAD2, "Jugador muy lejos.");
        	    }else SendClientMessageEx(playerid, COLOR_GRAD2, "Jugador desconectado.");
			}else SendClientMessageEx(playerid, COLOR_GRAD2, "* /contratar <jugador>");
		}else SendClientMessageEx(playerid, COLOR_GRAD2, "Usted no es lider de facciуn.");
		return 1;
	}
Tampoco aparece paycheck por ningun lado, estoy mareado.
Reply
#6

Pues veo que no aparece nada, bueno pues, ni idea de como funcionarнa la paga mediante ese archivo .txt.

Pero si lo deseas puedes tu mismo editar el comando /makeleader y /contratar. Para que le asigne un valor a la variable "pPayCheck"

NOTA: Si entras a una cuenta, no te saldrб pPayCheck -.- solo saldrб PayCheck =
Reply
#7

Me explicas Como o Que editarle ? Asi el Payday empieza a pagar? Gracias y disculpa.
Reply
#8

Un ejemplo sencillo, esto le darнa 2000 al jugador.

pawn Код:
zcmd(makeleader, playerid, params[])
    {
        if(Info[playerid][pAdminZC] > 1337 || Info[playerid][pFactionModerator] == 1)
        {
            if(!sscanf(params, "di", params[0], params[1]))
            {
                new ftext[30];
                if(params[1] < 0 || params[1] > MAX_FACTION)        return SendClientMessageEx(playerid, COLOR_GREY, "ID facciуn incorrecto.");
                if(!IsPlayerConnected(params[0]))                   return SendClientMessageEx(playerid, COLOR_GREY, "Jugado desconectado.");
                switch(params[1])
                {
                    case 0:     {Info[params[0]][pRank] = 0; ftext = "Ninguna"; }
                    case 1:     {Info[params[0]][pRank] = 6; ftext = "San Andreas Police Department"; }
                    case 2:     {Info[params[0]][pRank] = 6; ftext = "FBI"; }
                    case 3:     {Info[params[0]][pRank] = 6; ftext = "San Andreas Ejйrcito Militar"; }
                    case 4:     {Info[params[0]][pRank] = 6; ftext = "San Andreas Medical Deparment"; }
                    case 5:     {Info[params[0]][pRank] = 6; ftext = "SA News"; }
                    case 6:     {Info[params[0]][pRank] = 6; ftext = "Mecanicos 24/7"; }
                    case 7:     {Info[params[0]][pRank] = 6; ftext = "Gobierno"; }
                    case 8:     {Info[params[0]][pRank] = 6; ftext = "Hitman"; }
                    case 9:     {Info[params[0]][pRank] = 6; ftext = "Sistema Judicial"; }
                }
                new string[128];
                pTazer[params[0]] = 0;
                    Info[params[0]][pPayCheck] = 2000;
                Info[params[0]][pLeader] = params[1];
                Info[params[0]][pMember] = params[1];
                format(string, sizeof(string), "Administrador %s te asignу el lнder de la facciуn %s.", GetPlayerNameEx(playerid), ftext);
                SendClientMessageEx(params[0], 0x6ADFFFFF, string);
                format(string, sizeof(string), "AdmCmdExe: %s asigno lider de la facciуn %s a %s.", GetPlayerNameEx(playerid), ftext, GetPlayerNameEx(params[0]));
                ABroadCast(COLOR_ORANGE, string, 3);
            }
            else SendClientMessageEx(playerid, COLOR_GRAD2, "USA: /makeleader [jugador] [facciуn]");
        }
        else SendClientMessageEx(playerid, COLOR_GRAD2, "No autorizado.");
        return 1;
    }
Reply
#9

Muchas gracias por todo tu tiempo, Lo que hize fue lo siguiente,

Al comando /Makeleader

Le agrege la linea cambiandole el 2000 por 20000, es decir (a ver si entendi) al yo darle Lider. El sistema de Payday le darб 20.000 de paga. їNo?

luego al comando /contratar le puse lo mismo con menos monto.

Y por ultimo al comando /despedir, se lo puse pero con un 0, es decir le saca la paga.

Asi funcionaria bien? GraciaS!
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)