26.12.2015, 03:09
Salario ta indo sу para um jogador!Porque?
PHP код:
public OnGameModeInit()
{
SetTimer("SalarioJogo", 60000, true);
return 1;
}
forward SalarioJogo(playerid);
public SalarioJogo(playerid)
{
GetPlayerName(playerid, Nome, sizeof(Nome));
format(String, sizeof(String), CONTAS, Nome);
if(PlayerInfo[playerid][Trabalho] == 0)//Desempregado
{
DOF2_SetInt(String, "DinheiroBanco", DOF2_GetInt(String, "DinheiroBanco")+200);
DOF2_SaveFile();
SendClientMessage(playerid, 0xD8781000, "~~~~~~~~~~~~~~~~~ Salario ~~~~~~~~~~~~~~~~~");
SendClientMessage(playerid, 0xFFFFFF00, "Por estб conectado vocк recebeu seu salario");
SendClientMessage(playerid, 0xFFFFFF00, "Salario: {2B982F}R$200");
format(String, sizeof(String), "Saldo Atual: R$%d",DOF2_GetInt(String, "DinheiroBanco")),
SendClientMessage(playerid, 0xFFFFFF00, String);
SendClientMessage(playerid, 0xD8781000, "~~~~~~~~~~~~~~~~~ Salario ~~~~~~~~~~~~~~~~~");
}
if(PlayerInfo[playerid][Trabalho] == 1 || PlayerInfo[playerid][Trabalho] == 2 || PlayerInfo[playerid][Trabalho] == 3)//Policia Militar
{
DOF2_SetInt(String, "DinheiroBanco", DOF2_GetInt(String, "DinheiroBanco")+1500);
DOF2_SaveFile();
SendClientMessage(playerid, 0xD8781000, "~~~~~~~~~~~~~~~~~ Salario ~~~~~~~~~~~~~~~~~");
SendClientMessage(playerid, 0xFFFFFF00, "Por estб conectado vocк recebeu seu salario");
SendClientMessage(playerid, 0xFFFFFF00, "Salario: {2B982F}R$1500");
format(String, sizeof(String), "Saldo Atual: R$%d",DOF2_GetInt(String, "DinheiroBanco")),
SendClientMessage(playerid, 0xFFFFFF00, String);
SendClientMessage(playerid, 0xD8781000, "~~~~~~~~~~~~~~~~~ Salario ~~~~~~~~~~~~~~~~~");
}
if(PlayerInfo[playerid][Trabalho] == 12)//Traficante
{
DOF2_SetInt(String, "DinheiroBanco", DOF2_GetInt(String, "DinheiroBanco")+500);
DOF2_SaveFile();
SendClientMessage(playerid, 0xD8781000, "~~~~~~~~~~~~~~~~~ Salario ~~~~~~~~~~~~~~~~~");
SendClientMessage(playerid, 0xFFFFFF00, "Por estб conectado vocк recebeu seu salario");
SendClientMessage(playerid, 0xFFFFFF00, "Salario: {2B982F}R$500");
format(String, sizeof(String), "Saldo Atual: R$%d",DOF2_GetInt(String, "DinheiroBanco")),
SendClientMessage(playerid, 0xFFFFFF00, String);
SendClientMessage(playerid, 0xD8781000, "~~~~~~~~~~~~~~~~~ Salario ~~~~~~~~~~~~~~~~~");
}
if(PlayerInfo[playerid][Trabalho] == 13)//Assaltante
{
DOF2_SetInt(String, "DinheiroBanco", DOF2_GetInt(String, "DinheiroBanco")+800);
DOF2_SaveFile();
SendClientMessage(playerid, 0xD8781000, "~~~~~~~~~~~~~~~~~ Salario ~~~~~~~~~~~~~~~~~");
SendClientMessage(playerid, 0xFFFFFF00, "Por estб conectado vocк recebeu seu salario");
SendClientMessage(playerid, 0xFFFFFF00, "Salario: {2B982F}R$800");
format(String, sizeof(String), "Saldo Atual: R$%d",DOF2_GetInt(String, "DinheiroBanco")),
SendClientMessage(playerid, 0xFFFFFF00, String);
SendClientMessage(playerid, 0xD8781000, "~~~~~~~~~~~~~~~~~ Salario ~~~~~~~~~~~~~~~~~");
}
if(PlayerInfo[playerid][Trabalho] == 14)//Terrorista
{
DOF2_SetInt(String, "DinheiroBanco", DOF2_GetInt(String, "DinheiroBanco")+1200);
DOF2_SaveFile();
SendClientMessage(playerid, 0xD8781000, "~~~~~~~~~~~~~~~~~ Salario ~~~~~~~~~~~~~~~~~");
SendClientMessage(playerid, 0xFFFFFF00, "Por estб conectado vocк recebeu seu salario");
SendClientMessage(playerid, 0xFFFFFF00, "Salario: {2B982F}R$1200");
format(String, sizeof(String), "Saldo Atual: R$%d",DOF2_GetInt(String, "DinheiroBanco")),
SendClientMessage(playerid, 0xFFFFFF00, String);
SendClientMessage(playerid, 0xD8781000, "~~~~~~~~~~~~~~~~~ Salario ~~~~~~~~~~~~~~~~~");
}
if(PlayerInfo[playerid][Trabalho] == 11)//Prefeito
{
DOF2_SetInt(String, "DinheiroBanco", DOF2_GetInt(String, "DinheiroBanco")+0);
DOF2_SaveFile();
SendClientMessage(playerid, 0xD8781000, "~~~~~~~~~~~~~~~~~ Salario ~~~~~~~~~~~~~~~~~");
SendClientMessage(playerid, 0xFFFFFF00, "Vocк tem pregilegios Admin e nгo recebeu salario");
SendClientMessage(playerid, 0xFFFFFF00, "Salario: {2B982F}R$0");
format(String, sizeof(String), "Saldo Atual: R$%d",DOF2_GetInt(String, "DinheiroBanco")),
SendClientMessage(playerid, 0xFFFFFF00, String);
SendClientMessage(playerid, 0xD8781000, "~~~~~~~~~~~~~~~~~ Salario ~~~~~~~~~~~~~~~~~");
}
return 1;
}