14.06.2011, 19:50
Why this code doesnt work?
If the players_name.ini file doesnt exist in players folder then give him skin id 26 and sends message.
If the players_name.ini file does exist in players folder then load saved players pos from .ini file.
The file in the folder exist but it keeps giving me skin 26 and sends message.
If the players_name.ini file doesnt exist in players folder then give him skin id 26 and sends message.
If the players_name.ini file does exist in players folder then load saved players pos from .ini file.
The file in the folder exist but it keeps giving me skin 26 and sends message.
Код:
public OnPlayerSpawn(playerid) { new player[MAX_PLAYER_NAME]; GetPlayerName(playerid, player, sizeof(player)); if(!dini_Exists("players/%s.ini")) { SetPlayerSkin(playerid, 26); SendClientMessage(playerid, COLOR_WHITE, "Welcome new player!"); } if(dini_Exists("players/%s.ini")) { SendClientMessage(playerid, COLOR_WHITE, "Welcome back!"); SetPlayerPos(playerid,positionx,positiony,positionz); } return 1; }