0 Members and 1 Guest are viewing this topic.
new pExp[MAX_PLAYERS]; // this variable is to Experiencenew pTimeUP[MAX_PLAYERS]; // this variable is the time to get XP
public OnPlayerConnect(playerid){ pExp[playerid] = GetPlayerExp(playerid);// takes the value of the line "Experience" in the player file pTimeUP[playerid] = SetTimer("UpXP",60*60000,true); } return 1;}
public OnPlayerDisconnect(playerid, reason){ SetPlayerExp(playerid,pExp[playerid]);} return 1;}
stock UpXP(playerid){ pExp[playerid] ++; new string[50]; format(string,sizeof(string),"[XP] Congratulations you just won XP on our server",pExp[playerid]); SendClientMessage(playerid,-1,string); return 1;}
public SetPlayerExp(playerid,Exp){ format(INFO,256, REGISTERS, gPlayers[playerid]); //I created this in the WarChiefs, if you use another script just change dini_IntSet(INFO,"EXP",Exp);}public GetPlayerExp(playerid){ format(INFO,256, REGISTERS, gPlayers[playerid]); new exp; exp = dini_Int(INFO,"EXP"); return exp;}
i m a great script Editor
Is It Usefull? Or How Is This Usefull?