29.11.2012, 23:53
i have small problem, my script could not save stats
I have this error in CMD of server.cfg:
this is my onplayerconnect and onplayerdisconnect
I have this error in CMD of server.cfg:
Код:
*** YSI error: ini_open could not find or create file Players/Nick.ini
Код:
public OnPlayerConnect(playerid) { //PlayAudioStreamForPlayer(playerid, "http://www.croherze.com/introbozic.mp3"); SetPlayerCameraPos(playerid, -2704.532470,378.131256,14.979453); SetPlayerCameraLookAt(playerid, spawnX, spawnY, spawnZ); GangZoneShowForPlayer(playerid, RUSGZ, 0xFFFF0096); GangZoneShowForPlayer(playerid, FAGZ, 0x0000FF96); SendDeathMessage(INVALID_PLAYER_ID,playerid, 200); GangZoneShowForPlayer(playerid, GMGZ, 0x00FF0096); GangZoneShowForPlayer(playerid, BMGZ, 0x3E887496); ping[playerid] = 0; pokusaji[playerid] = 0; GPSon[playerid] = 0; GPSba[playerid] = 0; heal[playerid] = 0; Cit[playerid] = 0; GPSdo[playerid] = 0; GPSsp[playerid] = 0; Radio[playerid] = 0; UBanci[playerid] = 0; CB[playerid] = 0; // plivanje1[playerid] = 0; // plivanje2[playerid] = 0; //plivanje3[playerid] = 0; new stringe[128]; format( files,sizeof(files), BAN_FILE, PlayerName(playerid) ); if( fexist(files) ) { format( stringe, sizeof(stringe), ":: %s ::", PlayerName(playerid) ); SendClientMessage(playerid, -1, stringe); SendClientMessage(playerid, -1, "Vi ste banani sa ovog servera." ); SendClientMessage(playerid, -1, "http://samp.com/" ); Kick(playerid); } new naslov2[128], text[1024], strText[104]; format(strText, 35, USER_FILE, PlayerName(playerid)); if(!INI_Exists(strText)) { format(naslov2, sizeof(naslov2), "Registracija"); format(text, sizeof(text), ""COL_LIGHTBLUE"________________________________________________\n\n"COL_WHITE"Dobrodosao na CroHerzegovina DeathMatch server!\n\n\n"#COL_LIGHTBLUE"%s\n"#COL_WHITE"Tvoj korisnicki racun nije pronaden\n\n\nMolimo upisi svoju lozinku da se registriras:\n\n"COL_LIGHTBLUE"________________________________________________", PlayerName(playerid)); ShowPlayerDialog(playerid, DIALOG_REGISTER, DIALOG_STYLE_PASSWORD, naslov2, text, "Register", "Odustani"); } else { format(naslov2, sizeof(naslov2), ""#COL_WHITE"Logiranje"); format(text, sizeof(text),""COL_LIGHTBLUE"________________________________________________\n\n"COL_WHITE"Dobrodosao na CroHerzegovina DeathMatch server!\n\n\n"#COL_LIGHTBLUE"%s\n"#COL_WHITE"Tvoj korisnicki racun je pronaden\n\n\nMolimo upisi svoju lozinku da udjes na server:\n\n"COL_LIGHTBLUE"________________________________________________", PlayerName(playerid)); ShowPlayerDialog(playerid, DIALOG_LOGIN, DIALOG_STYLE_PASSWORD, naslov2, text, "Login", "Odustani"); } SetPVarInt(playerid, "Prijavljen", 1); OcistiChat(playerid); return 1; } public OnPlayerDisconnect(playerid, reason) { OnPlayerLogout(playerid); SendDeathMessage(INVALID_PLAYER_ID,playerid, 201); return 1; }