Vice City Multiplayer
VC:MP 0.3 => mIRC/pawn Scripting => ShowRoom (pawn) => Topic started by: NE.Restricted on August 09, 2014, 06:54:08 pm
-
Hello, guys!
Heres my second include. It adds a database function (not mysql) to your script.
Functions:
stock nedbset(entry[], point1[], point2[], data[])//entry: The entry you want to edit, data: The variable you want to edit in entry, point: The string you want to set the variable to.
stock nedbget(entry[], point1[], point2[])//Gets a variable info
:::nedbint:::same as nedbget but return integer
:::nedbfloat:::same as nedbget but return float
Note: You have to make an empty file named ndb.sys in scriptfiles for it to work.
No longer needed
Download:
http://www.solidfiles.com/d/ca77b88a6d/nedb.inc
Did it work for you? Tell in the replies!
-
Updated to include a note.
-
Hi, i installed your database script, but it gives me 3 errors, wich i fixed one
BEFORE: while(v2[count] != null&&found==0)
AFTER: while(v2[count][0] != null&&found==0)
But now i have 2 errors and i cant fix them, can you help me please?
C:\Users\The_Lucifer\Desktop\The Matrix Revolucion Latino\pawno\include\nedb.inc(14) : error 048: array dimensions do not match
C:\Users\The_Lucifer\Desktop\The Matrix Revolucion Latino\pawno\include\nedb.inc(32) : error 033: array must be indexed (variable "result")
Thanks :D
-
Hi, i installed your database script, but it gives me 3 errors, wich i fixed one
BEFORE: while(v2[count] != null&&found==0)
AFTER: while(v2[count][0] != null&&found==0)
But now i have 2 errors and i cant fix them, can you help me please?
C:\Users\The_Lucifer\Desktop\The Matrix Revolucion Latino\pawno\include\nedb.inc(14) : error 048: array dimensions do not match
C:\Users\The_Lucifer\Desktop\The Matrix Revolucion Latino\pawno\include\nedb.inc(32) : error 033: array must be indexed (variable "result")
Thanks :D
I will try to fix it.
-
Hi, i installed your database script, but it gives me 3 errors, wich i fixed one
BEFORE: while(v2[count] != null&&found==0)
AFTER: while(v2[count][0] != null&&found==0)
But now i have 2 errors and i cant fix them, can you help me please?
C:\Users\The_Lucifer\Desktop\The Matrix Revolucion Latino\pawno\include\nedb.inc(14) : error 048: array dimensions do not match
C:\Users\The_Lucifer\Desktop\The Matrix Revolucion Latino\pawno\include\nedb.inc(32) : error 033: array must be indexed (variable "result")
Thanks :D
fixxxed
-
Thanks :D, but now when i put the cmd !spawnhere it gives me this errors:
error 017: undefined symbol "nset"
error 017: undefined symbol "text"
I dont know if i have to make a new nset[128]; and new text[128]; :V
-
Thanks :D, but now when i put the cmd !spawnhere it gives me this errors:
error 017: undefined symbol "nset"
error 017: undefined symbol "text"
I dont know if i have to make a new nset[128]; and new text[128]; :V
replace:
nset with nedbset
nget with nedbget
and replace text with cmdtext if you are using a prebuilt script.
That code won't work anymore if you want me to make a new code tell me.
-
I realy dont know what do you mean with that the code wont work, but all the errors are fixed, but when a use !spawnhere then /kill, when i spawn it does not send me to the spawn location, can you please fix this? i already put your name on the credit section of my server :D
-
I realy dont know what do you mean with that the code wont work, but all the errors are fixed, but when a use !spawnhere then /kill, when i spawn it does not send me to the spawn location, can you please fix this? i already put your name on the credit section of my server :D
Use this code
public OnPlayerText(playerid, text[])
{
if(strcmp(text,"!spawnhere", true)==0)
{
new Float:px, Float:py, Float:pz,s[128];
GetPlayerPos(playerid,px,py,pz);
format(s,128,"%f", px);
nedbset("players", gPlayers[playerid], "asx", s);
format(s,128,"%f", py);
nedbset("players", gPlayers[playerid], "asy", s);
format(s,128,"%f", pz);
nedbset("players", gPlayers[playerid], "asz", s);s
SendClientMessage(playerid, COLOR_GREEN, "*NE.CrystalBlues function*You will now spawned right here.");
}
}
public OnPlayerSpawn(playerid,classid,teamid)
{
SetPlayerPos(playerid, floatstr(nedbget("players", gPlayers[playerid], "asx")),floatstr(nedbget("players", gPlayers[playerid], "asy")),floatstr(nedbget("players", gPlayers[playerid], "asz")));
}
This is updated so it will worrk now.
-
Okay, now im getting this errors:
(2692) : error 035: argument type mismatch (argument 4)
(2694) : error 035: argument type mismatch (argument 4)
(2696) : error 035: argument type mismatch (argument 4)
I tried to search that error on google but nothing came up :V
Those errors are on the !spawnhere cmd, here are the lines:
[2686] }
[2687] else if(strcmp(text,"!spawnhere", true)==0)
[2688] {
[2689] new Float:px, Float:py, Float:pz,s[128];
[2690] GetPlayerPos(playerid,px,py,pz);
[2691] format(s,128,"%f", px);
[2692] nedbset("players", gPlayers[playerid], "asx", s);
[2693] format(s,128,"%f", py);
[2694] nedbset("players", gPlayers[playerid], "asy", s);
[2695] format(s,128,"%f", pz);
[2696] nedbset("players", gPlayers[playerid], "asz", s);
[2697] SendClientMessage(playerid, COLOR_GREEN, "*NE.CrystalBlues function*You will now spawned right here.");
[2698] }
Sorry
-
Okay, now im getting this errors:
(2692) : error 035: argument type mismatch (argument 4)
(2694) : error 035: argument type mismatch (argument 4)
(2696) : error 035: argument type mismatch (argument 4)
I tried to search that error on google but nothing came up :V
Those errors are on the !spawnhere cmd, here are the lines:
[2686] }
[2687] else if(strcmp(text,"!spawnhere", true)==0)
[2688] {
[2689] new Float:px, Float:py, Float:pz,s[128];
[2690] GetPlayerPos(playerid,px,py,pz);
[2691] format(s,128,"%f", px);
[2692] nedbset("players", gPlayers[playerid], "asx", s);
[2693] format(s,128,"%f", py);
[2694] nedbset("players", gPlayers[playerid], "asy", s);
[2695] format(s,128,"%f", pz);
[2696] nedbset("players", gPlayers[playerid], "asz", s);
[2697] SendClientMessage(playerid, COLOR_GREEN, "*NE.CrystalBlues function*You will now spawned right here.");
[2698] }
Sorry
Sorry it was a bug with the include file.
Download from here
http://www.solidfiles.com/d/ca77b88a6d/nedb.inc
-
oh man link not not working!!! >:(
-
oh man link not not working!!! >:(
http://www.filedropper.com/nedb