SA-MP Forums Archive
Saving Ppos into Db - 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: Saving Ppos into Db (/showthread.php?tid=500077)



Saving Ppos into Db - yvoms - 11.03.2014

Greetings members, i again have another question for you,
I need some help on the script i have,
I want a dialog to open when u type the command,
and in the dialog you get a input wich will be the name of the pos,
after that, the pos should be saved into the database,
Could someone help me with this?

Код:
#include <a_samp>
#include <zcmd>
#include <a_mysql>
#define FILTERSCRIPT

enum {
	Float:dynX,
	Float:dynY,
	Float:dynZ,
	Float:dynA,
	}
	
public OnFilterScriptInit()
{
	print("\n------Sa:Mp(0.3Z)----------------------");
	print("Dynamic spawnpoint Creator");
	print("-------V1.0 By Yvoms--------------------\n");
	return 1;
}

COMMAND:SavePpos(playerid, Params[])
{
	GetPlayerPos(playerid, dynX, dynY, dynZ);
	GetPlayerFacingAngle(playerid, dynA);
	format([Plocation],32,"%S",dstring);

	format(dquery,sizeof(dquery),"INSERT INTO dspawns(`Pname`, `dynX`, `dynY`, `dynZ`, `dynA`);
	mysql_query(dquery);

	return 1;
}



Re: Saving Ppos into Db - yvoms - 11.03.2014

bump - Someone please help me on this.