Except the missing single quote that gave syntax error after modifying it, the query itself is working. The problem of not updating the database is that you never assign the new value to the variables:
Code:
CMD:setskin(playerid, params[])
{
new playerb, value;
if (sscanf(params, "ui", playerb, value))
return SendClientMessage(playerid, -1, "{88AA88}/setskin {FFFFFF}[playerid/nom] [id skin]");
GameTextForPlayer(playerid, "nouveau skin", 1000, 1);
SetPlayerSkin(playerb, value);
Player[playerb][Skin_Player] = value;
UpdatePlayerData(playerid);
return 1;
}
CMD:givemoney(playerid, params[])
{
new playerb, value;
if (sscanf(params, "ui", playerb, value))
return SendClientMessage(playerid, -1, "{88AA88}/givemoney {FFFFFF}[playerid/nom] [somme]");
GameTextForPlayer(playerid, "nouveau skin", 1000, 1);
GivePlayerMoney(playerb, value);
Player[playerb][Cash] = value;
UpdatePlayerData(playerid);
return 1;
}
so it just re-updated those two columns with the value of 0.
On another note, please check if
playerb is valid (connected) player before using it in arrays to avoid
run time error 4.