14.06.2011, 12:35
When i have this code in my script, no cmds work.
Code have to check if a file in players/ folder exist. If it exist, then take position of last saved player pos. If the file doesnt exist, then put player to skin 26 and give welcome messege!
Code have to check if a file in players/ folder exist. If it exist, then take position of last saved player pos. If the file doesnt exist, then put player to skin 26 and give welcome messege!
Код:
public OnPlayerSpawn(playerid) { new player[MAX_PLAYER_NAME]; GetPlayerName(playerid, player, sizeof(player)); new filename[8]; format(filename, 8, "pp/%s.ini"); if(fexist(filename)) { SetPlayerPos(playerid,positionx,positiony,positionz); } else { SetPlayerSkin(playerid, 26); SendClientMessage(playerid, COLOR_WHITE, "Welcome new player!"); } SetPlayerToTeamColour(playerid); TextDrawHideForPlayer(playerid, gTextDraw); return 1; }