Spawn help
#1

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"));
Reply
#2

is it so difficult that noone can help me?
Reply
#3

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


Forum Jump:


Users browsing this thread: 1 Guest(s)