SA-MP Forums Archive
IsPlayerV.I.P Check - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: IsPlayerV.I.P Check (/showthread.php?tid=109357)



IsPlayerV.I.P Check - Tigerbeast11 - 19.11.2009

I want to make a file where I put a vips name. How can i make pawn check if their ip is their and if true, then they can use vip cmds?

How?

Note: Need more info? Just ask...


Re: Making V.I.P Ip's? - [LCG]TANKER - 19.11.2009

create a type of database and have it check the database with GetPlayerIP


Re: Making V.I.P Ip's? - Tigerbeast11 - 19.11.2009

Quote:
Originally Posted by [LCG
TANKER ]
create a type of database and have it check the database with GetPlayerIP
Sorry, but i dont know how to do that, plz can u help me?

BTW: thnx for quick reply


Re: Making V.I.P Ip's? - Tigerbeast11 - 19.11.2009

plz help

sorry for bump


Re: Making V.I.P Ip's? - Oxside - 19.11.2009

I dont know how to make it. But look at a register script. In that kind of script you check of the password is in a file.
So if you can check for a password, you sure can check IP.

I think you can better make a V.I.P script based on name and password not on IP.
Just like admin


Re: Making V.I.P Ip's? - Tigerbeast11 - 19.11.2009

Quote:
Originally Posted by Oxside
I dont know how to make it. But look at a register script. In that kind of script you check of the password is in a file.
So if you can check for a password, you sure can check IP.

I think you can better make a V.I.P script based on name and password not on IP.
Just like admin
I dont want to do name and password because it will restrict them to that name. And, i don't know how to check for it Plz help me...

I wish i was good scripter, LOL


Re: Making V.I.P Ip's? - Tigerbeast11 - 19.11.2009

help?


Re: Making V.I.P Ip's? - Tigerbeast11 - 27.11.2009

BUMP! Plz help me guys!


Re: IsPlayerV.I.P Check - Tigerbeast11 - 27.11.2009

I know it will be like this:

Код:
// LethaL's Adminscript

#if defined _IsPlayerLAdmin_included
 #endinput
#endif
#define _IsPlayerLAdmin_included
#pragma library IsPlayerLAdmin

#include <a_samp>
#include <lethaldudb2>


stock IsPlayerLAdmin(playerid)
{

new name[MAX_PLAYER_NAME]; GetPlayerName(playerid, name, sizeof(name));
new file[256], tmp, tmp2; 

format(file,256,"/ladmin/users/%s.sav",udb_encode(name));
tmp = dini_Int(file,"level");
tmp2 = dini_Int(file,"loggedin");

if( (IsPlayerConnected(playerid)) && (tmp > 0) && (tmp2 == 1) )
	return true;
else return false;

}


stock IsPlayerAdminLevel(playerid, level)
{

new name[MAX_PLAYER_NAME]; GetPlayerName(playerid, name, sizeof(name));
new file[256], tmp, tmp2; 

format(file,256,"/ladmin/users/%s.sav",udb_encode(name));
tmp = dini_Int(file,"level");
tmp2 = dini_Int(file,"loggedin");
printf("tmp = %d, tmp2(logged) = %d, level = %d", tmp, tmp2, level );
if( (IsPlayerConnected(playerid)) && (tmp >= level) && (tmp2 != 0) )
	return true;
else return false;

}
[/code[

But I dont know what i will have to edit!



Re: IsPlayerV.I.P Check - Mujib - 27.11.2009

I assume you have got a admin system in your script, just copy everything from the admin but change ''Admin'' into ''Vip''
Example

Код:
enum pInfo
{
	pPassword[32],
	pLevel,
	pAdmin,
};
Add pVip;

Код:
enum pInfo
{
	pPassword[32],
	pLevel,
	pAdmin,
	pVip,
};
At register also copy the admin thingy and change the pAdmin into pVip.

And the /makevip command

http://pastebin.com/m178fde25