02.09.2010, 07:00
try this one, made it myself, and works.
Yes, that's true. That's not smart..
Код:
#include <a_samp> #include <Dini> forward LoadPlayerMoney(playerid); new pname[30]; new PlayerMoney[MAX_PLAYERS]; #define COLOR_RED 0xFA2B25AA public OnGameModeExit() { return 1; } public OnPlayerConnect(playerid) { if(!IsPlayerNPC(playerid)) { GetPlayerName(playerid,pname,30); if(!dini_Exists(pname)) dini_Create(pname); else if(dini_Exists(pname)) { PlayerMoney[playerid] = dini_Int(pname,"PlayerMoney"); } LoadPlayerMoney(playerid); return 1; } return 1; } public LoadPlayerMoney(playerid) { if(!IsPlayerNPC(playerid)){ GivePlayerMoney(playerid,PlayerMoney[playerid]); } } public OnPlayerDisconnect(playerid, reason) { if(!IsPlayerNPC(playerid)) { new Pname[24]; GetPlayerName(playerid, Pname, 24); dini_IntSet("Skins.ini", Pname, GetPlayerSkin(playerid)); } return 1; }