Re: Making an Admin Script with dini! -
Ironboy500[TW] - 09.09.2010
Nice Tuturial.
Begginers can learn alot from it.
Re: Making an Admin Script with dini! -
PinkFloydLover - 10.09.2010
Quote:
Originally Posted by TheGuardianAngel
good job , nice tutorial
|
Quote:
Originally Posted by Ironboy500[TW]
Nice Tuturial.
Begginers can learn alot from it.
|
Thanks Guys !
Re: Making an Admin Script with dini! -
willsuckformoney - 12.09.2010
lol this is epic really, i already made these.
pawn Code:
dcmd(register,8,cmdtext);
dcmd(login,5,cmdtext);
dcmd(setlevel,8,cmdtext);
dcmd(kick,4,cmdtext);
dcmd(ban,3,cmdtext);
dcmd(freeze,6,cmdtext);
dcmd(unfreeze,8,cmdtext);
dcmd(testcmds,8,cmdtext); //This command it to write down what commands i need to test ingame because i forget a lot D:
dcmd(explode,7,cmdtext);
dcmd(goto,4,cmdtext);
dcmd(get,3,cmdtext);
dcmd(slap,4,cmdtext);
dcmd(giveweapon,10,cmdtext); // Fixing this command now.
dcmd(setcash,7,cmdtext);
dcmd(setcolour,9,cmdtext);
dcmd(pm,2,cmdtext);
dcmd(m,1,cmdtext);
dcmd(reply, 5, cmdtext);
dcmd(r, 1, cmdtext);
dcmd(nopm, 4, cmdtext);
Re: Making an Admin Script with dini! -
Hiddos - 12.09.2010
Not bad explained, but could be a li'l bit better. Also, take a look at Y_Less's code optimization threads, especially this one:
https://sampforum.blast.hk/showthread.php?tid=55261
Overall, good job.
Re: Making an Admin Script with dini! -
PinkFloydLover - 12.09.2010
Thanks alot Hiddos, I thought I was suppose to use 256 cell strings for the files, I read in I think Y-Less' topic about why not to use 256 he mentioned the only time that you should use 256 cell strings was when reading from a file.
@willsuckformoney
Thanks man will you be releasing it sometime?
Re: Making an Admin Script with dini! -
willsuckformoney - 12.09.2010
Maybe, if I do it will be sometime next week, version 1 ofc.
Re: Making an Admin Script with dini! - CraZy_KiLLaH - 15.02.2011
Quote:
Originally Posted by homijs
Thanks..khmm peoples like me need more tuts like this
|
wiki.sa-mp.com
ktnx
Re: Making an Admin Script with dini! -
PinkFloydLover - 08.08.2011
5 being the maximum level possible, if the level entered is more then 5, it cancels any script past that point.
Just add that under the setlevel command.
Re: Making an Admin Script with dini! -
Shockey HD - 08.08.2011
Quote:
Originally Posted by PinkFloydLover
5 being the maximum level possible, if the level entered is more then 5, it cancels any script past that point.
Just add that under the setlevel command.
|
I asked that question a while back :P But thank you sir. Also, i switched to Y_INI which is way faster
Re: Making an Admin Script with dini! -
SwiftKidZ - 08.05.2012
Nice work
Re: Making an Admin Script with dini! -
shayan122 - 12.07.2012
Nice but how can i add Reason to kick and ban
like:
Code:
/Kick <ID> <REASON>
/Ban <ID> <REASON>
Re: Making an Admin Script with dini! -
Dubya - 12.07.2012
Fairly useful, but on OnPlayerCommandText, don't you need to add, something like "dcmd_COMMAND(playerid,
" or someting?
Re: Making an Admin Script with dini! -
Dubya - 12.07.2012
Quote:
Originally Posted by shayan122
Nice but how can i add Reason to kick and ban
like:
|
Use SSCANf, if you want to do it this way:
pawn Code:
if(sscanf(params, "us[128]", giveplayerid, reason)) return SendClientMessage(playerid, -1, "USAGE: /Kick <ID> <REASON>
Re: Making an Admin Script with dini! -
MovieDrifting - 20.11.2012
i don't under stand.. everything works fine just when i goto login it says your account isn't register but yet it is.. any help
Re: Making an Admin Script with dini! -
zombieking - 20.11.2012
Look at the topic date..: 06/09/2010, 07:10 AM
Plus, dini is now outdated.
Re: Making an Admin Script with dini! -
MovieDrifting - 20.11.2012
ok i fixed it
Re: Making an Admin Script with dini! -
Dubya - 21.11.2012
You could've done this:
pawn Code:
new checkname[128];
new playerName[MAX_PLAYER_NAME];
GetPlayerName(playerid, playerName, sizeof(playerName));
format(checkname, 128, "Users/%s.ini", playerName);
if(!fexists(checkname)) {
// Player has not register.... Code Here.
} else {
// Player has already register.. Code here.
Re: Making an Admin Script with dini! -
Frank Biohazard - 02.01.2013
I compiled after I made the /register and /login commands, but I got this:
pawn Code:
C:\Users\Gast\Desktop\SA-MP Server\gamemodes\TestCode.pwn(99) : warning 217: loose indentation
C:\Users\Gast\Desktop\SA-MP Server\gamemodes\TestCode.pwn(99) : error 029: invalid expression, assumed zero
C:\Users\Gast\Desktop\SA-MP Server\gamemodes\TestCode.pwn(99) : error 017: undefined symbol "reason"
C:\Users\Gast\Desktop\SA-MP Server\gamemodes\TestCode.pwn(99 -- 101) : error 029: invalid expression, assumed zero
C:\Users\Gast\Desktop\SA-MP Server\gamemodes\TestCode.pwn(99 -- 101) : fatal error 107: too many error messages on one line
Compilation aborted.Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase
4 Errors.
Here are my lines at the OnPlayerDisconnect:
pawn Code:
public OnPlayerDisconnect(playerid, reason)
{
new n[MAX_PLAYER_NAME], file[256];
GetPlayerName(playerid,n,sizeof(n));
format(file,sizeof(file),"MyAdmin/Users/%s.txt",n);
PInfo[playerid][Logged] = 0;
if(dini_Exists(file))
{
dini_IntSet(file,"Logged",0);
return 1;
}
What went wrong? I know it's outdated and stuff, but its the first language I actually understand.
Re: Making an Admin Script with dini! -
TheSkiestSky - 21.03.2013
Nice tut dude !!
Helped me alot with my admin system