pawn Код:
new Query[128],money[8],Float:X[10],FLoat:Y[10],Float:Z[10],SelectedSkin[10],CurrentSkin[10];
format(Query,sizeof(Query),"SELECT * FROM `users` WHERE username = '%s' LIMIT 1",PlayerName(playerid));
mysql_query(Query);
mysql_store_result();
mysql_retrieve_row();
mysql_get_field("Money",money);
mysql_get_field("SelectedSkin",SelectedSkin);
mysql_get_field("CurrentSkin",CurrentSkin);
mysql_get_field("X",X);
mysql_get_field("Y",Y);
mysql_get_field("Z",Z);
SetPlayerPos(playerid, strval(X), strval(Y), strval(Z)+1);
if(strval(SelectedSkin) == 0){
format(Query,sizeof(Query),"UPDATE `users` SET SelectedSkin='1',DefaultSki='%s',CurrentSki='%s' WHERE username = '%s'",GetPlayerSkin(playerid),GetPlayerSkin(playerid),PlayerName(playerid));
mysql_query(Query);
}
else{
SetPlayerSkin(playerid,strval(CurrentSkin));
}
SetPlayerMoney(playerid,strval(money));
mysql_free_result();