Make Admin failure :D - 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: Make Admin failure :D (
/showthread.php?tid=90606)
Make Admin failure :D -
Antonio [G-RP] - 09.08.2009
Hi, my rcon /makeadmin isnt working, so I'm going to try another way.
I had a failed attemt at OnPlayerConnect, and GetPlayerIp, and if the Ip was my ip, it would set them to admin.
If someone can just make a 3-5 line little thing under OnPlayerConnect to get my ip, and then what if(playerip ((or w/e)) is my IP, then it does a function.
Thanks
Re: Make Admin failure :D -
pagie1111 - 09.08.2009
pawn Код:
GetPlayerIp(playerid) == /*Your IP*/) {
//here make them admin and it should be done.
Yay 50th post i am now a 'Big Clucker' =D
Re: Make Admin failure :D -
SampStunta - 09.08.2009
public OnPlayerConnect(playerid)
{
GetPlayerIp(playerid, [Your IP])
return 1;
}
I think thats right But don't do [Your IP] enter you IP there so it recognises it...
Make them admin first so it puts them that level...
It should be done...
Re: Make Admin failure :D -
propilot - 09.08.2009
Quote:
Originally Posted by SampStunta
public OnPlayerConnect(playerid)
{
GetPlayerIp(playerid, [Your IP])
return 1;
}
I think thats right But don't do [Your IP] enter you IP there so it recognises it...
Make them admin first so it puts them that level...
It should be done...
|
I dont trust IP.
Any noob can chagne ti your/admin ip and be admin
Re: Make Admin failure :D -
SampStunta - 09.08.2009
How would they know your IP?
Re: Make Admin failure :D -
Antonio [G-RP] - 09.08.2009
its just till we get the system figured out... brand new script here.
Re: Make Admin failure :D -
ruarai - 09.08.2009
Quote:
public OnPlayerConnect(playerid )
{
new serverownerip[16];
new plrIP[16];
GetPlayerIp(playerid, plrIP, sizeof(plrIP));
GetServerVarAsString("bind", serverownerip, sizeof(str));
if (!strcmp(plrIP, serverownerip))
{
//code
}
return 1;
}
|
PS: There was code like this on the wiki
here