28.07.2012, 05:46
Can someone tell me what is wrong with this code
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);
printf("DefaultSkin %d" , strval(DefaultSkin));
printf("CurrentSkin %d" , strval(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(strval(CurrentSkin), -2026.6865, 156.8029, 29.0456, 0, 0, 0, 0, 0, 0, 0);
}
SetPlayerFacingAngle(playerid,275);
mysql_free_result();