DrPawn

acc speichern beispiel

Nov 29th, 2012
38
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.50 KB | None | 0 0
  1. stock AccSpeichern(playerid)//ACCZSAVE
  2. {
  3. new Float:leb,Float:ar;GetPlayerHealth(playerid,leb);GetPlayerArmour(playerid,ar);
  4. //printf(">>Speicherrung>> Leben und Amor : %f >>> %f",leb,ar);
  5. query("UPDATE `"#ACCTABELLE"` SET `Leben`='%f',`Armor`='%f' WHERE `Name`='%s'",leb,ar,sname[playerid]);
  6. new hauptsql[350];
  7. format(sql,128,"UPDATE `"#ACCTABELLE"` SET `Geld`='%d',`Fraktion`='%i',`Admin`='%i',`Skin`='%i',`Leader`='%i',`Rank`='%i',`SpawnStatus`='%i', ",Info[playerid][Geld],Info[playerid][Fraktion],Info[playerid][Admin],Info[playerid][Skin],Info[playerid][Leader],Info[playerid][FrakRank],Info[playerid][SpawnStatus]);
  8. strcat(hauptsql,sql);
  9. format(sql,128,"`Bank`='%i',`Konto`='%i',`Pin`='%i',`Kontotyp`='%i',`Job`='%i',",Info[playerid][Bank],Info[playerid][Konto],Info[playerid][Pin],Info[playerid][Kontotyp],Info[playerid][Job]);
  10. strcat(hauptsql,sql);
  11. format(sql,148,"`FrakSkin`='%i',`FrakGehalt`='%i',`HausNr`='%i',`HausMietNr`='%i',`SafePIN`='%i',`WaffenSchrankPIN`='%i',",Info[playerid][FrakSkin],Info[playerid][FrakGehalt],Info[playerid][HausNr],Info[playerid][MietHausNr],Info[playerid][SafePIN],Info[playerid][WaffenSchrankPIN]);
  12. strcat(hauptsql,sql);
  13. format(sql,56,"`CarAnzahl`='%i',`SpielZeit`='%i' ",Info[playerid][CarAnzahl],Info[playerid][SpielZeit]);
  14. strcat(hauptsql,sql);
  15. format(sql,56," WHERE `Name`='%s' ",sname[playerid]);
  16. strcat(hauptsql,sql);
  17. mysql_query(hauptsql);//print(hauptsql);//format(sql,128," ",Info[playerid][]);
  18. mysql_free return 1;
  19. }
Advertisement
Add Comment
Please, Sign In to add comment