SetPlayerSkin(playerid, DOF2_GetInt(file[], "Skin"));
stock CarregarPlayer(playerid) { if(DOF2_FileExists(ReturnFileUser(playerid))) { SetPlayerScore(playerid, DOF2_GetInt(ReturnFileUser(playerid), "Level")); SetPlayerMoney(playerid, DOF2_GetInt(ReturnFileUser(playerid), "Dinheiro")); PlayerDados[playerid][pAdmin] = DOF2_GetInt(ReturnFileUser(playerid),"Admin Level"); SetPlayerSkin(playerid, DOF2_GetInt(ReturnFileUser(playerid),"Skin")); PlayerDados[playerid][pVIP] = DOF2_GetInt(ReturnFileUser(playerid),"VIP"); } }
Penso que jб estб veja lб se faz favor
Код:
stock CarregarPlayer(playerid) { if(DOF2_FileExists(ReturnFileUser(playerid))) { SetPlayerScore(playerid, DOF2_GetInt(ReturnFileUser(playerid), "Level")); SetPlayerMoney(playerid, DOF2_GetInt(ReturnFileUser(playerid), "Dinheiro")); PlayerDados[playerid][pAdmin] = DOF2_GetInt(ReturnFileUser(playerid),"Admin Level"); SetPlayerSkin(playerid, DOF2_GetInt(ReturnFileUser(playerid),"Skin")); PlayerDados[playerid][pVIP] = DOF2_GetInt(ReturnFileUser(playerid),"VIP"); } } |
Senha = RJSM1994 Level = 1 Dinheiro = 5000 Admin Level = 1000 Skin = 29 VIP = 3
Senha = RJSM1994 Level = 1 Dinheiro = 5000 Admin Level = 1000 Skin = 0 VIP = 3
stock SalvarPlayer(playerid) { if(DOF2_FileExists(ReturnFileUser(playerid))) { DOF2_SetInt(ReturnFileUser(playerid),"Level",GetPlayerScore(playerid)); DOF2_SetInt(ReturnFileUser(playerid),"Dinheiro",GetPlayerMoney(playerid)); DOF2_SetInt(ReturnFileUser(playerid),"Admin Level",PlayerDados[playerid][pAdmin]); DOF2_SetInt(ReturnFileUser(playerid),"Skin",GetPlayerSkin(playerid)); DOF2_SetInt(ReturnFileUser(playerid),"VIP", PlayerDados[playerid][pVIP]); DOF2_SaveFile(); } } stock CarregarPlayer(playerid) { if(DOF2_FileExists(ReturnFileUser(playerid))) { SetPlayerScore(playerid, DOF2_GetInt(ReturnFileUser(playerid), "Level")); SetPlayerMoney(playerid, DOF2_GetInt(ReturnFileUser(playerid), "Dinheiro")); PlayerDados[playerid][pAdmin] = DOF2_GetInt(ReturnFileUser(playerid),"Admin Level"); SetPlayerSkin(playerid, DOF2_GetInt(ReturnFileUser(playerid),"Skin")); PlayerDados[playerid][pVIP] = DOF2_GetInt(ReturnFileUser(playerid),"VIP"); } } CMD:setskin(playerid, params[]) { if(!IsPlayerAdmin(playerid) && PlayerDados[playerid][pAdmin] < 2) return SendClientMessage(playerid,-1,"Vocк precisa estar logado na RCON ou ser admin level 2."); new skin; if(sscanf(params,"ud", giveplayerid, skin)) return SendClientMessage(playerid,-1,"Use: /setskin [ID] [Skin]"); if(!IsPlayerConnected(giveplayerid)) return SendClientMessage(playerid,-1,"Jogador nгo estб conectado."); new string[120]; format(string,sizeof(string),"{FF4040}%s {FFFAFA}trocou a skin de {FF4040}%s {FFFAFA}para {FF4040}%d", PlayerName(playerid), PlayerName(giveplayerid), skin); SendClientMessage(giveplayerid,-1,string); SetPlayerSkin(giveplayerid,skin); SalvarPlayer(giveplayerid); return 1; }