20.01.2015, 20:16
pawn Код:
GetPlayerPos(playerid,PlayerInfo[playerid][pPosX],PlayerInfo[playerid][pPosY],PlayerInfo[playerid][pPosZ]);
GetPlayerFacingAngle(playerid,PlayerInfo[playerid][pPosA]);
GetPlayerHealth(playerid,PlayerInfo[playerid][pHealth]);
GetPlayerArmour(playerid,PlayerInfo[playerid][pArmor]);
new strcatstring[300];
mysql_format(sqlid,strcatstring, sizeof(strcatstring),"UPDATE `users` SET `px`=%f,`py`=%f,`pz`=%f",
PlayerInfo[playerid][pPosX],
PlayerInfo[playerid][pPosY],
PlayerInfo[playerid][pPosZ],
PlayerInfo[playerid][pPosA]);
strcat(query,strcatstring);
mysql_format(sqlid,strcatstring, sizeof(strcatstring), "`hp`=%f, `armor`=%f WHERE username = '%e'",
PlayerInfo[playerid][pHealth],
PlayerInfo[playerid][pArmor],
GPN(playerid));
strcat(query,strcatstring);
mysql_tquery(sqlid,query, "", "");