09.09.2018, 20:29
I'm finishing a business system and now so close to finalizing, a problem has arisen in a command. You are the owner of the company when you fire the player, everything seems perfect . The company is clean but the player who is fired, the column on Mysql "Emp" (Is what detect that the player is in a company) don't is set to 0. I've tried to do everything but nothing works.
Thank you for all help, it's important.
The command is currently like that, i ran out of alternatives.
Thank you for all help, it's important.

The command is currently like that, i ran out of alternatives.
Код:
CMD:removeslot1(playerid,params[])
{
new string[1100], Query[130];
for(new i = 0; i < MAX_PLAYERS; i++)
for(new c = 0; c < MAX_PROPIEDADES; c++)
{
if(IsPlayerInRangeOfPoint(playerid,2.5,PropInfo[c][pPosX],PropInfo[c][pPosY],PropInfo[c][pPosZ]))
{
if(!strcmp(PropInfo[c][pPropietario], NombreJugador(playerid), true))
{
if(strcmp(PropInfo[c][pFunc], NombreJugador(playerid), true) || strcmp(PropInfo[c][pFunc1], NombreJugador(playerid), true) || strcmp(PropInfo[c][pFunc2], NombreJugador(playerid), true) || strcmp(PropInfo[c][pFunc3], NombreJugador(playerid), true))
{
if(!strcmp(PropInfo[c][pFunc], NombreJugador(i)))
{
PlayeriInfo[i][pEmp] = 0;
}
format(string, 128,"You {ff0000} fired {FFFFFF} from company {0066ff}% s {FFFFFF} who worked in production {0066ff} 1 {FFFFFF}.", PropInfo[c][pFunc]);
SendClientMessage(playerid, -1, string);
format(Query,sizeof(Query),"UPDATE `usuarios` SET `Emp`='0' WHERE `ID`=%d",PropInfo[c][pFunc]);
mysql_function_query(Conecction,Query,true,"","");
CargarPropiedad©;
format(Query,sizeof(Query),"UPDATE `propiedades` SET `Func`='Nobody' WHERE `ID`=%d",PropInfo[c][pID]);
mysql_function_query(Conecction,Query,true,"","");
format(PropInfo[c][pFunc], 24, "Nobody");
break;
}
else return SendClientMessage(playerid, COLOR_ROJO, "The slot is busy!");
}
else return SendClientMessage(playerid, COLOR_ROJO, "You aren't the owner of this company.");
}
}
return 1;
}


