• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
[Pawn] MySQL Weapon save custom
#1
They saved every weapon from the server after disconnected

But I wants them to custom save

exam: /getgun from the gang = not save

/weapon = save

sorry for my bad explain I don't know how to explain to be clear



PHP Code:
public OnPlayerDisconnect(playeridreason)

{

for (new 
0<= 12i)

{

? ?
GetPlayerWeaponData(playeridiweapons1[i][0], weapons1[i][1]);

? ?if(!
weapons1[i][0]) continue; // don't insert if there's no weapon in this slot

mysql_format(dbConquerysizeof(query), "INSERT INTO `WeaponData` (ID, WeaponID, Ammo) VALUES (%d, %d, %d) ON DUPLICATE KEY UPDATE `Ammo` = `Ammo`  %d"PlayerInfo[playerid][pSQLID], weapons1[i][0], weapons1[i][1], weapons1[i][1]);

mysql_query(dbConquery);

printf("weapon: %d, ammo: %d"weapons1[i][0], weapons1[i][1]);

}

return 
1;





PHP Code:
?if(strcmp(cmd"/weapon"true) == 0)

?{

???? 
GivePlayerWeapon(playerid24500);

???? 
GivePlayerWeapon(playerid30500);

???? 
GivePlayerWeapon(playerid81);

?} 

PHP Code:
?if(strcmp(cmd"/getgun"true) == 0)

?{

???? 
GivePlayerWeapon(playerid24500);

???? 
GivePlayerWeapon(playerid30500);

???? 
GivePlayerWeapon(playerid81);

?} 
  Reply


Messages In This Thread
MySQL Weapon save custom - by Zow - 2019-09-30, 04:17 PM
RE: MySQL Weapon save custom - by Tama - 2019-10-01, 04:26 AM

Forum Jump: