Deleting from SQL table - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (
https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Deleting from SQL table (
/showthread.php?tid=219713)
Deleting from SQL table -
Antonio [G-RP] - 02.02.2011
I've got an idea on how to do this, but I'm not 100% sure.
So, lets say I'm going to be deleting a faction, but theres players in it. What I want to do, is go INTO the SQL table, find every account that has the "factionid" set to that faction, and set the factionid to 0.
Any comments are helpful, unless your a dumbass.
Re: Deleting from SQL table -
coole210 - 02.02.2011
I'm a lil rusty so im gonna look at my gamemode
Alright your idea seems right, you just make everyone's account have a default faction id (in this case 0) then delete the whole faction row.
lol its not that i dont script anymore, its because ive been learning C++ and assembly.. making dlls to work with sa-mp, AKA adding client cmds to sa-mp
Re: Deleting from SQL table -
Antonio [G-RP] - 02.02.2011
Or, what I could do... delete from the SQL table, and from the online players, and then under the loading variables, put..
pawn Код:
if(FactionInfo[PlayerInfo[playerid][pFaction]][fSQLid] == INVALID_SQL_ID) PlayerInfo[playerid][pFaction] = 0;
Re: Deleting from SQL table -
coole210 - 02.02.2011
Just test it, mate. Trial and error all the way.