SA-MP Forums Archive
paycheck - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: Non-English (https://sampforum.blast.hk/forumdisplay.php?fid=9)
+--- Forum: Languages (https://sampforum.blast.hk/forumdisplay.php?fid=33)
+---- Forum: Español/Spanish (https://sampforum.blast.hk/forumdisplay.php?fid=29)
+---- Thread: paycheck (/showthread.php?tid=537954)



paycheck - Jeree10 - 19.09.2014

como hago que por cada nivel de diferentes pagos por hora osea por ejemplo al nivel 4 que de $250

Codigo
Код:
}
					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, 		"-------------------------------------------------");



Respuesta: paycheck - Juance - 19.09.2014

Hace un switch, que obtenga cada nivel del jugador.

pawn Код:
switch(PlayerInfo[i][pNivel]) //Si hay una variable en pNivel
{
    case 4: GivePlayerMoney(i,250); //y es 4..
    case 5: GivePlayerMoney(i,350); //o es 5..
    //etc...
}



Respuesta: paycheck - Jeree10 - 19.09.2014

Este switch debe ir arriba del cуdigo que te pase o abajo?


Re: paycheck - Alban - 19.09.2014

Yo te doy algo simple y facil pero no se le varia:

pawn Код:
PlayerInfo[i][pAccount] = Info[i][pPayCheck]+ TaxValue+Info[i][pLevel]*100;

}
                    SendClientMessageEx(i, COLOR_WHITE,         "* ESTADO DE CUENTA DEL BANCO DE SAN ANDREAS * ");
                    format(string, sizeof(string),              "  Pago:  $%d | Impuestos   : -$%d", Info[i][pPayCheck]+Info[i][pLevel]*100, 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,         "-------------------------------------------------");
Cada 1 nivel de mas recibe 100 pesos mas.


Re: paycheck - Jeree10 - 20.09.2014

Quote:
Originally Posted by Alban
Посмотреть сообщение
Yo te doy algo simple y facil pero no se le varia:

pawn Код:
PlayerInfo[i][pAccount] = Info[i][pPayCheck]+ TaxValue+Info[i][pLevel]*100;

}
                    SendClientMessageEx(i, COLOR_WHITE,         "* ESTADO DE CUENTA DEL BANCO DE SAN ANDREAS * ");
                    format(string, sizeof(string),              "  Pago:  $%d | Impuestos   : -$%d", Info[i][pPayCheck]+Info[i][pLevel]*100, 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,         "-------------------------------------------------");
Cada 1 nivel de mas recibe 100 pesos mas.
Algo paso soy nivel 13 y me $500