Re: Script Request Thread #3
#41

Quote:
Originally Posted by Yanzl
That worked, thanks alot.
this way you have a code more efficient for the same result

pawn Код:
public OnPlayerRequestSpawn(playerid)
{
  if(pClass[playerid] == yanzl)
  {
    if(PlayerInfo[playerid][pAdminLevel] >= 1 || IsPlayerAdmin(playerid)) return 1;
    else
    {
          SendClientMessage(playerid,COLOR_RED,"This skin only for admins!");
          return 0;
    }
  }

  return 1;
}
Reply
#42

Hey guys so me and a friend are begineers at Pawno and we jsut made a server and wondering if someone could help.

When people join our server you have to have a real name such as Ben_Gale and if they dont they get kicked and it dont say why and i want them to get a message saying they got kicked becuase the ydid not have the right name format.

Also we would like to add a /guide or /tutorial to the place where people spawn, anyone help with these?

Thx a lot for reading and hope you can help me out
Reply
#43

Quote:
Originally Posted by Ben_Gale
Hey guys so me and a friend are begineers at Pawno and we jsut made a server and wondering if someone could help.

When people join our server you have to have a real name such as Ben_Gale and if they dont they get kicked and it dont say why and i want them to get a message saying they got kicked becuase the ydid not have the right name format.

Also we would like to add a /guide or /tutorial to the place where people spawn, anyone help with these?

Thx a lot for reading and hope you can help me out
There is a FS with kick if its not got a _ in it somewhere
Reply
#44

Quote:
Originally Posted by Mowgli
Quote:
Originally Posted by Ben_Gale
Hey guys so me and a friend are begineers at Pawno and we jsut made a server and wondering if someone could help.

When people join our server you have to have a real name such as Ben_Gale and if they dont they get kicked and it dont say why and i want them to get a message saying they got kicked becuase the ydid not have the right name format.

Also we would like to add a /guide or /tutorial to the place where people spawn, anyone help with these?

Thx a lot for reading and hope you can help me out
There is a FS with kick if its not got a _ in it somewhere
Sorry i duno if its cos i jsut had a sleep or what but tht jsut went over my head lool sorry

What u mean?>
Reply
#45

Код:
stock GetPlayerFirstName(playerid)
{
	new namestring[2][MAX_PLAYER_NAME];
	new name[MAX_PLAYER_NAME];
	GetPlayerName(playerid,name,MAX_PLAYER_NAME);
	split(name, namestring, '_');
	return namestring[0];
}
stock GetPlayerLastName(playerid)
{
	new namestring[2][MAX_PLAYER_NAME];
	new name[MAX_PLAYER_NAME];
	GetPlayerName(playerid,name,MAX_PLAYER_NAME);
	split(name, namestring, '_');
	return namestring[1];
}

RPName(name[],ret_first[],ret_last[])
{
	new len = strlen(name),
		point = -1,
		bool:done = false;
	for(new i = 0; i < len; i++)
	{
	  if(name[i] == '_')
	  {
	    if(point != -1) return 0;
	    else {
				if(i == 0) return 0;
				point = i + 1;
			}
	  } else if(point == -1) ret_first[i] = name[i];
	  else {
			ret_last[i - point] = name[i];
			done = true;
		}
	}
	if(!done) return 0;
	return 1;
}

public OnPlayerConnect(playerid)
{
new first[MAX_PLAYER_NAME], last[MAX_PLAYER_NAME];
if(RPName(PlayerName(playerid),first,last))
{
SendClientMessage(playerid,COLOR_YELLOW,"Welcome to My server");
}
else
{
KickPlayer(playerid,"System","Invalid Name, Correct Format: Firstname_lastname.");
}
return 1;
}
i found that by just searching.
Reply
#46

Alright, I need help with a /sellgun /accept command. I don't want the gun to cost anything and make it have anfinite ammo. I just want it to cost mats not money. So it would be like /sellgun weaponname playerid:::/accept gun.
Thanks
Reply
#47

Hello, I am looking for a basic admin script with the fallowing commands:

I searched for one but the ones I found either had to many commands or didn't have a stats system..

ban - perm ban someone
tempban - ban someone for a specific amount of days
kick - kicks someone
warn - warn someone
report - reports people to online admins
announce - Sends an announcement using
get - tele someone to you
goto - goto someone
stats - get the kills and deaths of a player
register - register your account
login - login to your account

I'm not requesting someone make this, I am asking if anyone found a script similar to this..

Thanks a bunch
Reply
#48

Quote:
Originally Posted by [B
Vortex ]
Hello, I am looking for a basic admin script with the fallowing commands:

I searched for one but the ones I found either had to many commands or didn't have a stats system..

ban - perm ban someone
tempban - ban someone for a specific amount of days
kick - kicks someone
warn - warn someone
report - reports people to online admins
announce - Sends an announcement using
get - tele someone to you
goto - goto someone
stats - get the kills and deaths of a player
register - register your account
login - login to your account

I'm not requesting someone make this, I am asking if anyone found a script similar to this..

Thanks a bunch
http://forum.sa-mp.com/index.php?topic=36990.0?
Reply
#49

Doesnt have tempban, and it has 150+commands, way more than I want, if you read what I wanted you'd know..
Reply
#50

Err, it actually looks like you don't have a clue about what you're saying. Because you said similar. If you really want a script like that you've posted, then script one. And if you don't want help, then don't post...
Reply
#51

I also said the ones I found had to many commands.

And I have no clue how to script an admin script. Wich is why I want a basic one, so I can read it easier, and learn from it.
Reply
#52

Quote:
Originally Posted by [B
Vortex ]
I also said the ones I found had to many commands.

And I have no clue how to script an admin script. Wich is why I want a basic one, so I can read it easier, and learn from it.
look there http://snoob-community.wikispaces.com/Script for EMPTY.pwn ...
you can modify that to your need, ... its an empty GM with really basic admin cmd ...
Reply
#53

Quote:
Originally Posted by snoob
Quote:
Originally Posted by [B
Vortex ]
I also said the ones I found had to many commands.

And I have no clue how to script an admin script. Wich is why I want a basic one, so I can read it easier, and learn from it.
look there http://snoob-community.wikispaces.com/Script for EMPTY.pwn ...
you can modify that to your need, ... its an empty GM with really basic admin cmd ...
Thanks a bunch! How would I convert thoes into dcmd? would I just replace the " if(strcmp(cmd, "/command", true) == 0)" to dcmd_command and and make new dcmd(command, 7, cmdtext) ?

Thanks
Reply
#54

Hello..

I need someone to code a BASIC admin system with the fallowing features

* 5 admin levels
* register command - Level 0
* login command Level 0
* stats saving and stats command - Level 0
* ban command - Level 3
* tempban command (in days) - Level 2
* kick command - Level 1
* get command - Level 4
* goto command - Level 4
* setlevel command - Level 5
* spec command - Level 0
* report command - Level 0
* drop command (for checking if someones health hacking) - Level 1
* admincmds command (list of the fallowing commands) - Level 1

That's ALL I want at the moment.

So whats in it for you?
We are in the hosted list (if not, your reading this before I buy it, but we are getting it).
You will get a place in the credits command
You will get level 4 admin
You will become a member in our clan which is invite only (if you want to)

If you are willing to make the server the admin filter script, please PM me.

BY THE WAY: If I find out that you did NOT code the admin fs you gave me you will loose all of the above privileges ^
Reply
#55

I dont understand what `drop` ocmmand should do?
Reply
#56

Quote:
Originally Posted by klavins
I dont understand what `drop` ocmmand should do?
It moves the player up a few feet from their current position, then drops them to see if they get damaged.
Reply
#57

hello good I just wanted to come to ask for a menu that is to tune a car but not on all sides in a specific side
if they can that the menu contains these options
-Painting
-Painting 2
-Wheels
Front bumper
-Rear Bumper
Side bumper
-vinyl
-Other:-nitro
-Hidraulics
-Radio



and please I need besides a code that makes the mechanism a faction

and please the menu can be used only for this faction

Reply
#58

Quote:
Originally Posted by Headucation
Abernethy:
pawn Код:
dcmd_setlevel(playerid,params[])
{
    if(IsPlayerAdmin(playerid) || PlayerInfo[playerid][pLevel] >= 5)
    {
        new tmp[256],idx;
        tmp = strtok(params,idx);
        if(!strlen(tmp))
        {
            SendClientMessage(playerid,COLOR_GREY,"Syntax: /setlevel [playerid] [level]");
            return true;
        }
        new otherid = strval(tmp);
        if(!IsPlayerConnected(otherid))
        {
            SendClientMessage(playerid,COLOR_GREY,"Incorrect playerid.");
            return true;
        }
        tmp = strtok(params,idx);
        if(!strlen(tmp))
        {
            SendClientMessage(playerid,COLOR_GREY,"Syntax: /setlevel [playerid] [level]");
            return true;
        }
        new level = strval(tmp);
        if(level > 5)
        {
            SendClientMessage(playerid,COLOR_GREY,"The Maximum level is 5");
            return true;
        }
        new string[256], pName[MAX_PLAYER_NAME], pName2[MAX_PLAYER_NAME];
        GetPlayerName(otherid,pName,sizeof(pname));
        GetPlayerName(playerid,pName2,sizeof(pname2));
        format(string,sizeof(string),"%s has made you an administrator (Level: %d)",pName2,level);
        SendClientMessage(otherid,COLOR_YELLOW,string);
        format(string,sizeof(string),"You have made %s an Admin (Level: %d)",pName,level);
        SendClientMessage(playerid,COLOR_YELLOW,string);
        PlayerInfo[otherid][pLevel] = level;
        dUserSetINT(PlayerName(otherid)).("AdminLevel", PlayerInfo[otherid][pLevel]);
        return true;
    }
    else return SendClientMessage(playerid,COLOR_RED,"This is an Admin command only.");
}
You have to define DCMD and have Latest Version of Dini.inc, Also you have to get a Registration system that was made in Dini, so That the people you add as Admin will get their Level saved,

Hope this helps
I just changed the code, to this.
pawn Код:
if (strcmp("/setlevel", cmdtext, true) == 0)
    {
    if(IsPlayerAdmin(playerid) || PlayerInfo[playerid][pLevel] >= 5)
    {
        new tmp[256],idx;
        tmp = strtok(params,idx);
        if(!strlen(tmp))
        {
            SendClientMessage(playerid,COLOR_GREY,"Syntax: /setlevel [playerid] [level]");
            return true;
        }
        new otherid = strval(tmp);
        if(!IsPlayerConnected(otherid))
        {
            SendClientMessage(playerid,COLOR_GREY,"Incorrect playerid.");
            return true;
        }
        tmp = strtok(params,idx);
        if(!strlen(tmp))
        {
            SendClientMessage(playerid,COLOR_GREY,"Syntax: /setlevel [playerid] [level]");
            return true;
        }
        new level = strval(tmp);
        if(level > 5)
        {
            SendClientMessage(playerid,COLOR_GREY,"The Maximum level is 5");
            return true;
        }
        new string[256], pName[MAX_PLAYER_NAME], pName2[MAX_PLAYER_NAME];
        GetPlayerName(otherid,pName,sizeof(pname));
        GetPlayerName(playerid,pName2,sizeof(pname2));
        format(string,sizeof(string),"%s has made you an administrator (Level: %d)",pName2,level);
        SendClientMessage(otherid,COLOR_RED,string);
        format(string,sizeof(string),"You have made %s an Admin (Level: %d)",pName,level);
        SendClientMessage(playerid,COLOR_RED,string);
        PlayerInfo[otherid][pLevel] = level;
        //dUserSetINT(PlayerName(otherid)).("AdminLevel", PlayerInfo[otherid][pLevel]);
        return true;
    }
    else return SendClientMessage(playerid,COLOR_RED,"This is an Admin command only.");
}
I'm receiving these errors; (I have to go right now, I don't have time to stuff around looking for solutions )

Код:
C:\Users\Madhouse\Desktop\Server\filterscripts\pDonation.pwn(173) : error 017: undefined symbol "params"
C:\Users\Madhouse\Desktop\Server\filterscripts\pDonation.pwn(185) : error 017: undefined symbol "params"
C:\Users\Madhouse\Desktop\Server\filterscripts\pDonation.pwn(198) : error 017: undefined symbol "pname"
C:\Users\Madhouse\Desktop\Server\filterscripts\pDonation.pwn(198) : error 029: invalid expression, assumed zero
C:\Users\Madhouse\Desktop\Server\filterscripts\pDonation.pwn(198) : warning 215: expression has no effect
C:\Users\Madhouse\Desktop\Server\filterscripts\pDonation.pwn(199) : error 017: undefined symbol "pname2"
C:\Users\Madhouse\Desktop\Server\filterscripts\pDonation.pwn(199) : error 029: invalid expression, assumed zero
C:\Users\Madhouse\Desktop\Server\filterscripts\pDonation.pwn(199) : warning 215: expression has no effect
C:\Users\Madhouse\Desktop\Server\filterscripts\pDonation.pwn(172) : warning 203: symbol is never used: "idx"
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


6 Errors.
Reply
#59

Quote:
Originally Posted by Abernethy
Quote:
Originally Posted by Headucation
Abernethy:
pawn Код:
dcmd_setlevel(playerid,params[])
{
    if(IsPlayerAdmin(playerid) || PlayerInfo[playerid][pLevel] >= 5)
    {
        new tmp[256],idx;
        tmp = strtok(params,idx);
        if(!strlen(tmp))
        {
            SendClientMessage(playerid,COLOR_GREY,"Syntax: /setlevel [playerid] [level]");
            return true;
        }
        new otherid = strval(tmp);
        if(!IsPlayerConnected(otherid))
        {
            SendClientMessage(playerid,COLOR_GREY,"Incorrect playerid.");
            return true;
        }
        tmp = strtok(params,idx);
        if(!strlen(tmp))
        {
            SendClientMessage(playerid,COLOR_GREY,"Syntax: /setlevel [playerid] [level]");
            return true;
        }
        new level = strval(tmp);
        if(level > 5)
        {
            SendClientMessage(playerid,COLOR_GREY,"The Maximum level is 5");
            return true;
        }
        new string[256], pName[MAX_PLAYER_NAME], pName2[MAX_PLAYER_NAME];
        GetPlayerName(otherid,pName,sizeof(pname));
        GetPlayerName(playerid,pName2,sizeof(pname2));
        format(string,sizeof(string),"%s has made you an administrator (Level: %d)",pName2,level);
        SendClientMessage(otherid,COLOR_YELLOW,string);
        format(string,sizeof(string),"You have made %s an Admin (Level: %d)",pName,level);
        SendClientMessage(playerid,COLOR_YELLOW,string);
        PlayerInfo[otherid][pLevel] = level;
        dUserSetINT(PlayerName(otherid)).("AdminLevel", PlayerInfo[otherid][pLevel]);
        return true;
    }
    else return SendClientMessage(playerid,COLOR_RED,"This is an Admin command only.");
}
You have to define DCMD and have Latest Version of Dini.inc, Also you have to get a Registration system that was made in Dini, so That the people you add as Admin will get their Level saved,

Hope this helps
I just changed the code, to this.
pawn Код:
if (strcmp("/setlevel", cmdtext, true) == 0)
    {
    if(IsPlayerAdmin(playerid) || PlayerInfo[playerid][pLevel] >= 5)
    {
        new tmp[256],idx;
        tmp = strtok(params,idx);
        if(!strlen(tmp))
        {
            SendClientMessage(playerid,COLOR_GREY,"Syntax: /setlevel [playerid] [level]");
            return true;
        }
        new otherid = strval(tmp);
        if(!IsPlayerConnected(otherid))
        {
            SendClientMessage(playerid,COLOR_GREY,"Incorrect playerid.");
            return true;
        }
        tmp = strtok(params,idx);
        if(!strlen(tmp))
        {
            SendClientMessage(playerid,COLOR_GREY,"Syntax: /setlevel [playerid] [level]");
            return true;
        }
        new level = strval(tmp);
        if(level > 5)
        {
            SendClientMessage(playerid,COLOR_GREY,"The Maximum level is 5");
            return true;
        }
        new string[256], pName[MAX_PLAYER_NAME], pName2[MAX_PLAYER_NAME];
        GetPlayerName(otherid,pName,sizeof(pname));
        GetPlayerName(playerid,pName2,sizeof(pname2));
        format(string,sizeof(string),"%s has made you an administrator (Level: %d)",pName2,level);
        SendClientMessage(otherid,COLOR_RED,string);
        format(string,sizeof(string),"You have made %s an Admin (Level: %d)",pName,level);
        SendClientMessage(playerid,COLOR_RED,string);
        PlayerInfo[otherid][pLevel] = level;
        //dUserSetINT(PlayerName(otherid)).("AdminLevel", PlayerInfo[otherid][pLevel]);
        return true;
    }
    else return SendClientMessage(playerid,COLOR_RED,"This is an Admin command only.");
}
I'm receiving these errors; (I have to go right now, I don't have time to stuff around looking for solutions )

Код:
C:\Users\Madhouse\Desktop\Server\filterscripts\pDonation.pwn(173) : error 017: undefined symbol "params"
C:\Users\Madhouse\Desktop\Server\filterscripts\pDonation.pwn(185) : error 017: undefined symbol "params"
C:\Users\Madhouse\Desktop\Server\filterscripts\pDonation.pwn(198) : error 017: undefined symbol "pname"
C:\Users\Madhouse\Desktop\Server\filterscripts\pDonation.pwn(198) : error 029: invalid expression, assumed zero
C:\Users\Madhouse\Desktop\Server\filterscripts\pDonation.pwn(198) : warning 215: expression has no effect
C:\Users\Madhouse\Desktop\Server\filterscripts\pDonation.pwn(199) : error 017: undefined symbol "pname2"
C:\Users\Madhouse\Desktop\Server\filterscripts\pDonation.pwn(199) : error 029: invalid expression, assumed zero
C:\Users\Madhouse\Desktop\Server\filterscripts\pDonation.pwn(199) : warning 215: expression has no effect
C:\Users\Madhouse\Desktop\Server\filterscripts\pDonation.pwn(172) : warning 203: symbol is never used: "idx"
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


6 Errors.
1. Change 'params' to 'cmdtext'.

2. new pname[MAX_PLAYER_NAME];

3. new pname2[MAX_PLAYER_NAME];
Reply
#60

I want to set the Map Text
Like setgamemodetext
I want to have the map text to Los Santos
Reply


Forum Jump:


Users browsing this thread: 3 Guest(s)