Clean Script
#1

Im in need of a clean script that has a register,money etc system and any good systems. . and NOT GF related.

Just like new.pwn in the pawno folder exept with these essential features.

Can someone point me in the right direction or give me a link?

Im currently making one, got spawn locations,skins, car spawns.

Just need the essentials.
Reply
#2

this is really basic, ...
http://snoob-community.wikispaces.com/EMPTY.pwn
maybe you can take some idea... i hope it will help.
Reply
#3

Thanks alot! I'll take a look.

If anybody has anything else or a link to this kinda GM in the forum.

I'll release my non.gf gm once it's done. Im a perfectionist so it will take a few weeks.
Reply
#4

Thanks alot! I'll take a look.

If anybody has anything else or a link to this kinda GM in the forum.

I'll release my non.gf gm once it's done. Im a perfectionist so it will take a few weeks.
Reply
#5

Quote:
Originally Posted by Matthew_Murdoch
Thanks alot! I'll take a look.

If anybody has anything else or a link to this kinda GM in the forum.

I'll release my non.gf gm once it's done. Im a perfectionist so it will take a few weeks.
how about searcvh urself?
we arent here to do your work..
Reply
#6

I have could not find what i require, just blank scripts with cars etc
Reply
#7

Snoob, that gm u gave me, its missing a money system
Reply
#8

Quote:
Originally Posted by Matthew_Murdoch
Snoob, that gm u gave me, its missing a money system
well if u would look a bit more closer to that script ud see urself how to do X_X
change "writeinfo"
to
pawn Код:
writeinfo(playerid){
  // This function is use to store curent player info in our file.
  new PlaName[MAX_PLAYER_NAME],path[128]; //creating string for name and path
  UserInfo[playerid][MONEY] = GetPlayerMoney(playerid);
  GetPlayerName(playerid, PlaName, sizeof(PlaName));//store playername in PlaName
  format(path, sizeof(path), "snoob/registered/%s", PlaName);// formating the path
  new tmp[128], File:regfile = fopen(path,io_write);//needed variable...
  format(tmp, sizeof(tmp),"%s\r\n%s\r\n%i\r\n%i\r\n%i\r\n",// formating the string...
   UserInfo[playerid][PASSWORD], UserInfo[playerid][LASTIP],
  UserInfo[playerid][LEVEL],  UserInfo[playerid][KILL], UserInfo[playerid][DEATH],UserInfo[playerid][MONEY]);
then change "OnPlayerConnect"
to
pawn Код:
public OnPlayerConnect(playerid)
{
  //////////////////////////////////////////
  UserInfo[playerid][LEVEL] = 0;
  UserInfo[playerid][KILL] = 0;
  UserInfo[playerid][DEATH] = 0;
  UserInfo[playerid][MUSTLOGIN] = 0;
  UserInfo[playerid][MONEY] = 0;
  // we reset the player info on connection.
  //////////////////////////////////////////
 
   if (IsPlayerRegistered(playerid)) { // if the player is registered
    loadinfo(playerid); //load the player info
    UserInfo[playerid][MUSTLOGIN] = 1; //this player will need to login before spawn
    SendClientMessage(playerid, COLOR_TXT, "This name is registered, Please /login");//inform the player he need to login
  }
  else SendClientMessage(playerid, COLOR_TXT, "You can use /register to protect your name.");//inform the player he need to login
  return 1;
}
then change enum info on line 6
to
pawn Код:
enum info { MUSTLOGIN, PASSWORD[30], LASTIP[30], LEVEL, KILL, DEATH, Float:RATIO, MONEY };//defines the UserInfos
Be happy i were bored^^

Have Fun

-Saiberfun


Edit:
Oh and change loadinfo
to

pawn Код:
loadinfo(playerid)
{
  // this function is used to load the player ifo from the file
  new PlaName[MAX_PLAYER_NAME],path[128]; //creating string for name and path
  GetPlayerName(playerid, PlaName, sizeof(PlaName));//store playername in PlaName
  format(path, sizeof(path), "snoob/registered/%s", PlaName);// formating the path
  new tmpload[128], File:regfile; // needed var...
  regfile = fopen(path,io_read); //opening file for reading
  fread(regfile,UserInfo[playerid][PASSWORD],30); //reading first line(password) and store it to tmp.
  strdel(UserInfo[playerid][PASSWORD],strlen(UserInfo[playerid][PASSWORD])-2,strlen(UserInfo[playerid][PASSWORD]));
  fread(regfile,UserInfo[playerid][LASTIP],30); //reading second line(lastIP) and store it to tmp.
  strdel(UserInfo[playerid][LASTIP],strlen(UserInfo[playerid][LASTIP])-2,strlen(UserInfo[playerid][LASTIP]));
  fread(regfile,tmpload,sizeof(tmpload)); //reading third line(level)
  UserInfo[playerid][LEVEL] = strval(tmpload);//storing the string value...
  fread(regfile,tmpload,sizeof(tmpload)); //reading
  UserInfo[playerid][KILL] = strval(tmpload);//storing
  fread(regfile,tmpload,sizeof(tmpload)); //reading
  UserInfo[playerid][DEATH] = strval(tmpload);//storing
  fread(regfile,tmpload,sizeof(tmpload)); //reading
  UserInfo[playerid][MONEY] = strval(tmpload);//storing
  fclose(regfile);// closing the file.
  ResetPlayerMoney(playerid);//resetting old money
  GivePlayerMoney(playerid,UserInfo[playerid][MONEY]);//giving the saved money
  return 1;//load complete we RETURN 1;
}
Reply
#9

Dude it compiles but the money doesn't write to script files

it shows:
127.0.0.1 (IP)
euro (password)
5 (level)
0 (kill)
0 (death)

theres no money part.

Reply
#10

just use pawno and do it.. do " NEw "
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)