27.07.2012, 20:30
Top Line
OnPlayerReqestClass:
I Want the player to select skin only the first time he connects
and to save him skin into DefaultSkin
pawn Код:
new FirstSpawn[MAX_PLAYERS] = false;
pawn Код:
AddPlayerClass(29,-2026.6143,156.5304,29.0391,275.7126,0,0,0,0,0,0); // SPAWN
AddPlayerClass(10,-2026.6143,156.5304,29.0391,275.7126,0,0,0,0,0,0); // SPAWN
AddPlayerClass(1,-2026.6143,156.5304,29.0391,275.7126,0,0,0,0,0,0); // SPAWN
AddPlayerClass(2,-2026.6143,156.5304,29.0391,275.7126,0,0,0,0,0,0); // SPAWN
AddPlayerClass(3,-2026.6143,156.5304,29.0391,275.7126,0,0,0,0,0,0); // SPAWN
AddPlayerClass(6,-2026.6143,156.5304,29.0391,275.7126,0,0,0,0,0,0); // SPAWN
AddPlayerClass(7,-2026.6143,156.5304,29.0391,275.7126,0,0,0,0,0,0); // SPAWN
AddPlayerClass(13,-2026.6143,156.5304,29.0391,275.7126,0,0,0,0,0,0); // SPAWN
AddPlayerClass(12,-2026.6143,156.5304,29.0391,275.7126,0,0,0,0,0,0); // SPAWN
AddPlayerClass(18,-2026.6143,156.5304,29.0391,275.7126,0,0,0,0,0,0); // SPAWN
AddPlayerClass(17,-2026.6143,156.5304,29.0391,275.7126,0,0,0,0,0,0); // SPAWN
AddPlayerClass(20,-2026.6143,156.5304,29.0391,275.7126,0,0,0,0,0,0); // SPAWN
AddPlayerClass(21,-2026.6143,156.5304,29.0391,275.7126,0,0,0,0,0,0); // SPAWN
AddPlayerClass(22,-2026.6143,156.5304,29.0391,275.7126,0,0,0,0,0,0); // SPAWN
AddPlayerClass(23,-2026.6143,156.5304,29.0391,275.7126,0,0,0,0,0,0); // SPAWN
AddPlayerClass(26,-2026.6143,156.5304,29.0391,275.7126,0,0,0,0,0,0); // SPAWN
AddPlayerClass(32,-2026.6143,156.5304,29.0391,275.7126,0,0,0,0,0,0); // SPAWN
AddPlayerClass(28,-2026.6143,156.5304,29.0391,275.7126,0,0,0,0,0,0); // SPAWN
AddPlayerClass(29,-2026.6143,156.5304,29.0391,275.7126,0,0,0,0,0,0); // SPAWN
AddPlayerClass(45,-2026.6143,156.5304,29.0391,275.7126,0,0,0,0,0,0); // SPAWN
AddPlayerClass(46,-2026.6143,156.5304,29.0391,275.7126,0,0,0,0,0,0); // SPAWN
AddPlayerClass(47,-2026.6143,156.5304,29.0391,275.7126,0,0,0,0,0,0); // SPAWN
AddPlayerClass(48,-2026.6143,156.5304,29.0391,275.7126,0,0,0,0,0,0); // SPAWN
AddPlayerClass(58,-2026.6143,156.5304,29.0391,275.7126,0,0,0,0,0,0); // SPAWN
AddPlayerClass(60,-2026.6143,156.5304,29.0391,275.7126,0,0,0,0,0,0); // SPAWN
AddPlayerClass(65,-2026.6143,156.5304,29.0391,275.7126,0,0,0,0,0,0); // SPAWN
AddPlayerClass(66,-2026.6143,156.5304,29.0391,275.7126,0,0,0,0,0,0); // SPAWN
AddPlayerClass(67,-2026.6143,156.5304,29.0391,275.7126,0,0,0,0,0,0); // SPAWN
SetPlayerFacingAngle(playerid,275);
new Query[128],DefaultSkin[4],CurrentSkin[4],CurrentJob[1];
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);
mysql_get_field("CurrentJob",CurrentJob);
if(strval(DefaultSkin) != 0){
SpawnPlayer(playerid);
SetPlayerSkin(playerid,strval(CurrentSkin));
gTeam[playerid] = strval(CurrentJob);
}
else{
FirstSpawn[playerid] = true;
}
mysql_free_result();
and to save him skin into DefaultSkin