27.07.2012, 22:14
Whats wrong with this code. i have set DefaultSkin to 1 and CurrentSkin to 100 and it dont wanna show the MotorGuy(Skin:100)
pawn Код:
SetPlayerPos(playerid, -2026.6865, 156.8029, 29.0456);
SetPlayerCameraPos(playerid, -2021.6796, 156.3540, 29.3975);
SetPlayerCameraLookAt(playerid, -2026.6865, 156.8029, 29.0456);
SetPlayerFacingAngle(playerid,275);
new Query[128],DefaultSkin[8],CurrentSkin[8];
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("DefaultSkin",DefaultSkin);
mysql_get_field("CurrentSkin",CurrentSkin);
if(strval(DefaultSkin) == 0){
AddPlayerClass(29, -2026.6865, 156.8029, 29.0456, 0, 0, 0, 0, 0, 0, 0);
AddPlayerClass(10, -2026.6865, 156.8029, 29.0456, 0, 0, 0, 0, 0, 0, 0);
}
else{
AddPlayerClass(CurrentSkin, -2026.6865, 156.8029, 29.0456, 0, 0, 0, 0, 0, 0, 0);
}
SetPlayerFacingAngle(playerid,275);
mysql_free_result();