[HELP] Consultation MYSQL Server - 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)
+--- Thread: [HELP] Consultation MYSQL Server (
/showthread.php?tid=552891)
[HELP] Consultation MYSQL Server -
Shura - 27.12.2014
I want to make a character that is level 15 and have 100 kills or whatever, is repeated in the creation of another character, same for levels 30 and 60. (Only these 3 levels).
Example: I have a character level 30 with 200 kills, if I think another, I want the character you just created (customizing it to level 30, has also 200 kills). Same for level 15 and 60.
What is wrong with this? I tried but could not, give reputation.
Код:
DECLARE @Kills INT
IF EXISTS (SELECT K1 FROM Chars WHERE UserUID = @UserUID AND Level = 15 OR Level = 30 OR Level = 60 ORDER BY K1 DESC LIMIT 1)
BEGIN
SET @Kills = (SELECT K1 FROM Chars WHERE UserUID = @UserUID AND Level = 15 OR Level = 30 OR Level = 60 ORDER BY K1 DESC LIMIT 1)
END
ELSE
BEGIN
SET @Kills = 0
END