04.03.2010, 15:29
Hey,
Well i'm trying to make this faction system but with the command /factioncreate, The coordinates and the interior get set as 0.
With the mysql log I got this:
Anyone know why this happens?
thanks
James
Well i'm trying to make this faction system but with the command /factioncreate, The coordinates and the interior get set as 0.
pawn Код:
dcmd_factioncreate(playerid, params[])
{
new gangcount, name, giveplayerid;
if (sscanf(params, "si", name, giveplayerid)) return SendClientMessage(playerid, COLOR_HOTPINK, "[VT ERROR] Right Usage: /factioncreate [FName] [LID]");
else
{
new Float:x,Float:y,Float:z;
GetPlayerPos(playerid,x,y,z);
new Float:interior;
interior = GetPlayerInterior(playerid);
gangcount = djInt("GangCount", "Count")+ 1;
format(query,sizeof(query),"INSERT INTO `factions` (sqlid, spawnx,spawny, spawnz, spawnint ,wep1, wep2, wep3, wep4, skin, leaderskin, bank, leaderid) VALUES (%d,%f,%f,%f,%d,%d,%d,%d,%d,%d,%d,%d,%d)", gangcount,x,y,z, interior, 24, 29, 5, 25, 0, 0, 0, giveplayerid);
mysql_query(query);
}
return 1;
}
Код:
[16:24:07] CMySQLHandler::Query(INSERT INTO `factions` (sqlid, spawnx,spawny, spawnz, spawnint ,wep1, wep2, wep3, wep4, skin, leaderskin, bank, leaderid) VALUES (10,0.000000,0.000000,0.000000,0,24,29,5,25,0,0,0,0)) - Successfully executed.
thanks
James