stock SavePlayerObject(playerid, index, modelid, boneid, Float:fOffsetX, Float:fOffsetY, Float:fOffsetZ, Float:fRotX, Float:fRotY, Float:fRotZ, Float:fScaleX, Float:fScaleY, Float:fScaleZ)
{
new string[500];
switch(index)
{
case SLOT_TESTA:
{
format(string,sizeof(string),"%d,%d,%.2f,%.2f,%.2f,%.2f,%.2f,%.2f,%.2f,%.2f,%.2f",modelid, boneid, Float:fOffsetX, Float:fOffsetY, Float:fOffsetZ, Float:fRotX, Float:fRotY, Float:fRotZ, Float:fScaleX, Float:fScaleY, Float:fScaleZ);
MySQLUpdatePlayerStr(query, PlayerInfo[playerid][pSQLID], "OggettoTesta",string);
}
case SLOT_BOCCA:
{
format(string,sizeof(string),"%d,%d,%.2f,%.2f,%.2f,%.2f,%.2f,%.2f,%.2f,%.2f,%.2f",modelid, boneid, Float:fOffsetX, Float:fOffsetY, Float:fOffsetZ, Float:fRotX, Float:fRotY, Float:fRotZ, Float:fScaleX, Float:fScaleY, Float:fScaleZ);
MySQLUpdatePlayerStr(query, PlayerInfo[playerid][pSQLID], "OggettoBocca",string);
}
case SLOT_OCCHI:
{
format(string,sizeof(string),"%d,%d,%.2f,%.2f,%.2f,%.2f,%.2f,%.2f,%.2f,%.2f,%.2f",modelid, boneid, Float:fOffsetX, Float:fOffsetY, Float:fOffsetZ, Float:fRotX, Float:fRotY, Float:fRotZ, Float:fScaleX, Float:fScaleY, Float:fScaleZ);
MySQLUpdatePlayerStr(query, PlayerInfo[playerid][pSQLID], "OggettoOcchi",string);
}
}
}
stock LoadPlayerObject(playerid)
{
new index, modelid, boneid, Float:fOffsetX, Float:fOffsetY, Float:fOffsetZ, Float:fRotX, Float:fRotY, Float:fRotZ, Float:fScaleX, Float:fScaleY, Float:fScaleZ;
//the string with all values it's PlayerInfo[playerid][pOggTesta]
SetPlayerAttachedObject(playerid, index, modelid, boneid, Float:fOffsetX, Float:fOffsetY, Float:fOffsetZ, Float:fRotX, Float:fRotY, Float:fRotZ, Float:fScaleX, Float:fScaleY, Float:fScaleZ);
}
mysql_fetch_row(variableName);
sscanf(variableName, "p<|>ddfffffffff", all variables here, variable2, variable3, etc);
pawn Код:
|
mysql_fetch_row();
Nope, when you use
pawn Код:
|
stock LoadPlayerObject(playerid)
{
new modelid, boneid, Float:fOffsetX, Float:fOffsetY, Float:fOffsetZ, Float:fRotX, Float:fRotY, Float:fRotZ, Float:fScaleX, Float:fScaleY, Float:fScaleZ;
sscanf(PlayerInfo[playerid][pOggTesta], "p<,>ddfffffffff",modelid,boneid,fOffsetX,fOffsetY,fOffsetZ,fRotX,fRotY,fRotZ,fScaleX,fScaleY,fScaleZ);
if(modelid != -1)
{
new string[60];
SetPlayerAttachedObject(playerid, SLOT_TESTA, modelid, boneid, fOffsetX, fOffsetY, fOffsetZ, fRotX, fRotY, fRotZ, fScaleX, fScaleY, fScaleZ);
format(string,sizeof(string),"%d,%d,%.2f,%.2f,%.2f,%.2f,%.2f,%.2f,%.2f,%.2f,%.2f",modelid,boneid,fOffsetX,fOffsetY,fOffsetZ,fRotX,fRotY,fRotZ,fScaleX,fScaleY,fScaleZ);
SendClientMessage(playerid,COLOR_WHITE,string);
}
sscanf(PlayerInfo[playerid][pOggBocca], "p<,>ddfffffffff",modelid,boneid,fOffsetX,fOffsetY,fOffsetZ,fRotX,fRotY,fRotZ,fScaleX,fScaleY,fScaleZ);
if(modelid != -1)
{
new string[60];
SetPlayerAttachedObject(playerid, SLOT_BOCCA, modelid, boneid, fOffsetX, fOffsetY, fOffsetZ, fRotX, fRotY, fRotZ, fScaleX, fScaleY, fScaleZ);
format(string,sizeof(string),"%d,%d,%.2f,%.2f,%.2f,%.2f,%.2f,%.2f,%.2f,%.2f,%.2f",modelid,boneid,fOffsetX,fOffsetY,fOffsetZ,fRotX,fRotY,fRotZ,fScaleX,fScaleY,fScaleZ);
SendClientMessage(playerid,COLOR_WHITE,string);
}
sscanf(PlayerInfo[playerid][pOggOcchi], "p<,>ddfffffffff", modelid,boneid,fOffsetX,fOffsetY,fOffsetZ,fRotX,fRotY,fRotZ,fScaleX,fScaleY,fScaleZ);
if(modelid != -1)
{
new string[60];
SetPlayerAttachedObject(playerid, SLOT_OCCHI, modelid, boneid, fOffsetX, fOffsetY, fOffsetZ, fRotX, fRotY, fRotZ, fScaleX, fScaleY, fScaleZ);
format(string,sizeof(string),"%d,%d,%.2f,%.2f,%.2f,%.2f,%.2f,%.2f,%.2f,%.2f,%.2f",modelid,boneid,fOffsetX,fOffsetY,fOffsetZ,fRotX,fRotY,fRotZ,fScaleX,fScaleY,fScaleZ);
SendClientMessage(playerid,COLOR_WHITE,string);
}
}
[19:37:06] 0,0,0.00,0.00,0.00,0.00,0.00,0.00,0.00,0.00,0.00
[19:37:06] 0,0,0.00,0.00,0.00,0.00,0.00,0.00,0.00,0.00,0.00
[19:37:06] 0,0,0.00,0.00,0.00,0.00,0.00,0.00,0.00,0.00,0.00