25.01.2013, 00:42
pawn Код:
if(Logged[playerid] == 1)
{
new Float:x, Float:y, Float:z, Float:a;
GetPlayerPos(playerid, x, y, z);
GetPlayerFacingAngle(playerid, a);
PlayerInfo[playerid][pPosX] = x;
PlayerInfo[playerid][pPosY] = y;
PlayerInfo[playerid][pPosZ] = z;
PlayerInfo[playerid][pPosA] = a;
new score = GetPlayerScore(playerid);
new money = GetPlayerMoney(playerid);
new health = GetPlayerHealth(playerid); //(1867) : warning 202: number of arguments does not match definition
new armour = GetPlayerArmour(playerid); //(1868) : warning 202: number of arguments does not match definition
new interior = GetPlayerInterior(playerid);
new virtualworld = GetPlayerVirtualWorld(playerid);
new query[300], pname[24];
GetPlayerName(playerid, pname, 24);
format(query, sizeof(query), "UPDATE playerdata SET score=%d, money=%d, health=%d, armour=%d, interior=%d, virtualworld=%d, level=%d, vip=%d, kma=%d, rank=%d, kills=%d, deaths=%d, muted=%d, skin=%d, spec=%d, duty=%d, jailed=%d, frozen=%d, mutedtimes=%d, jailedtimes=%d, frozentimes=%d, banned=%d, bannedby='%s', logins=%d, posx=%f, posy=%f, posz=%f, posa=%f WHERE user='%s'",
score,
money,
health,
armour,
interior,
virtualworld,
PlayerInfo[playerid][pLevel],
PlayerInfo[playerid][pVIP],
PlayerInfo[playerid][pKMA],
PlayerInfo[playerid][pRank],
PlayerInfo[playerid][pKills],
PlayerInfo[playerid][pDeaths],
PlayerInfo[playerid][pMuted],
PlayerInfo[playerid][pSkin],
PlayerInfo[playerid][pSpec],
PlayerInfo[playerid][pDuty],
PlayerInfo[playerid][pJailed],
PlayerInfo[playerid][pFrozen],
PlayerInfo[playerid][pMutedTimes],
PlayerInfo[playerid][pJailedTimes],
PlayerInfo[playerid][pFrozenTimes],
PlayerInfo[playerid][pBanned],
PlayerInfo[playerid][pBannedBy],
PlayerInfo[playerid][pLogins],
PlayerInfo[playerid][pPosX],
PlayerInfo[playerid][pPosY],
PlayerInfo[playerid][pPosZ],
PlayerInfo[playerid][pPosA],
pname);
mysql_query(query);
}
return 1;