SA-MP Forums Archive
Spawn help - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Spawn help (/showthread.php?tid=115782)



Spawn help - TouR - 25.12.2009

hello guys... i have created a dini save system and i want to know how to do this: If one player has already askin when he connects he has not to choose a skin again... I use this code:


public OnPlayerDisconnect(playerid, reason)
{
new Pname[24];
GetPlayerName(playerid, Pname, 24);
new file[128];
format(file,sizeof(file),"\\skins\\%s.ini",udb_enc ode(Pname));
dini_IntSet(file, "skin", GetPlayerSkin(playerid));

GetPlayerName(playerid, Pname, 24);

format(file,sizeof(file),"\\teams\\%s.ini",udb_enc ode(Pname));
dini_IntSet(file, "team", GetPlayerTeam(playerid));
SendDeathMessage(INVALID_PLAYER_ID, playerid, 201);
return 1;
}








public OnPlayerSpawn(playerid)
{
new Pname[24];
GetPlayerName(playerid, Pname, 24);
new file[128];
format(file,sizeof(file),"\\skins\\%s.ini",udb_enc ode(Pname));
if(!dini_Exists(file))
dini_Create(file);
else
SetPlayerSkin(playerid, dini_Int(file, "skin"));

GetPlayerName(playerid, Pname, 24);
format(file,sizeof(file),"\\teams\\%s.ini",udb_enc ode(Pname));
if(!dini_Exists(file))
dini_Create(file);
else
SetPlayerTeam(playerid, dini_Int(file, "team"));


Re: Spawn help - TouR - 25.12.2009

is it so difficult that noone can help me?


Re: Spawn help - Correlli - 26.12.2009

You've made a bump after 10 minutes, don't bump for no reason and read the rule about bumping.