09.09.2010, 07:09
Nice Tuturial.
Begginers can learn alot from it.
Begginers can learn alot from it.
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);
if (level > 5) return 0;
/Kick <ID> <REASON> /Ban <ID> <REASON>
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.
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.
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;
}