07.12.2016, 17:24
Hello all
i have an update code with mysql
but unfortunately its not working
i have an update code with mysql
but unfortunately its not working
PHP код:
else if(pickupid == gift1)
{
if(XInfo[playerid][pGiftTaken1] == 0)
{
SendClientMessage(playerid,COLOR_ERROR,"You have Found Present Number 1. Keep Searching for the remaining presents !");
new EscName[MAX_PLAYER_NAME];
mysql_real_escape_string(PlayerName(playerid),EscName);
SendClientMessage(playerid,COLOR_ERROR,"You have Found Present Number 1. Keep Searching for the remaining presents !");
new query[100];
format(query,sizeof(query),"UPDATE xmas SET pGiftTaken1='%d' WHERE nicknames='%s'",XInfo[playerid][pGiftTaken1], EscName);
XInfo[playerid][pGiftTaken1] =XInfo[playerid][pGiftTaken1]+1;
mysql_reconnect();
mysql_query(query);
}
else if(XInfo[playerid][pGiftTaken1] == 1)
{
SendClientMessage(playerid,0x912334,"You have already found this present. Search for other presents around the map.");
}
}
return 1;