23.06.2010, 22:54
er...now i got a new problem :S
now when i spawn...i spawn with cj skin (id 0)
and the weird part is i never added that skin in my ongamemodint
anyways heres the new code...
sorry man
now when i spawn...i spawn with cj skin (id 0)
and the weird part is i never added that skin in my ongamemodint

anyways heres the new code...
Quote:
public OnPlayerSpawn(playerid) { SetPlayerInterior(playerid,0); SetPlayerToTeamColor(playerid); Spawned[playerid] =1; new file[128]; SetPlayerSkin(playerid, dini_Int(file, "Skin")); return 1; } |
Quote:
public OnPlayerRequestClass(playerid, classid) { SetPlayerPos(playerid,-2667.1704,1430.0757,906.4609); SetPlayerCameraPos(playerid, -2667.1614,1427.8644,906.4609); SetPlayerCameraLookAt(playerid, -2667.1704,1430.0757,906.4609); SetPlayerFacingAngle(playerid,181.662 ![]() SetPlayerInterior(playerid,3); SetPlayerTeamFromClass(playerid, classid); new file[128], string[128]; new name[MAX_PLAYER_NAME]; GetPlayerName(playerid, name, sizeof(name)); format(file,sizeof(file),"/USERS/%s.ini",name); if (IsLogged[playerid] == 0) { if(!fexist(file)) { format(string, sizeof string, "We have detected that your account is NOT registered \n\nPlease register your account", name); ShowPlayerDialog(playerid, REG, DIALOG_STYLE_INPUT, "Account", string, "Register", "Cancel."); } if(fexist(file)) { format(string, sizeof string, "We have detected that your account is registered \n\nPlease login to your account", name); ShowPlayerDialog(playerid, LOG, DIALOG_STYLE_INPUT, "Account", string, "Login", "Cancel."); } return 1; } if(!fexist(file)) { dini_IntSet(file, "Skin", classid); } switch (classid) { case 0,1,2,3,4,5: { GameTextForPlayer(playerid, "~b~POLICE OFFICER~n~~w~CITY OFFICER", 3000, 5); } case 6: { GameTextForPlayer(playerid, "~b~S.W.A.T.", 3000, 5); } case 7: { GameTextForPlayer(playerid, "~b~FBI", 3000, 5); } case 8,9,10: { GameTextForPlayer(playerid, "~b~ARMY OFFICER~n~", 3000, 5); } case 11,12,14,16,18,20,22,24,26,28,30,32,34,36,38,40,42 ,44,46,48,50,52,54,56,58,60,62,64,66,68,70,72,74,7 6,78,80,82,84,86,88,90,92,94,96,98,100,102,104,106 ,108,110,112,114,116,118,120,122,124,126,128,130,1 32,134,136,138,140,142,144,146,148,150,152,154,156 ,158,160,162,164,166,168,170,172,174,176,178,180,1 82,184,186,188,189: { GameTextForPlayer(playerid, "~w~CIVILIAN~b~", 3000, 5); } } return 1; } |
sorry man
