[HELP!] OnPlayerConnect Check If Player Is Admin! -
Veeco - 24.11.2012
Hey

When i connect to my server i want the server to check if the people is admin and then give like 9000 score and some weapons and set that health so they dont dead and more

Understand? :P
Help!!

+1rep to that guy as fix that to me!
Re: [HELP!] OnPlayerConnect Check If Player Is Admin! -
ItalianKiller1568 - 24.11.2012
pawn Код:
public OnPlayerConnect(playerid)
{
if(IsPlayerAdmin))
{
GivePlayerScore(playerid, 9000);
GivePlayerWeapon(playerid, 38, 50000);
SetPlayerHealth(playerid, 100000);
SetPlayerArmour(playerid, 100000);
}
return 1;
}
EDIT : You don't know to do this and then you script for money ? Watch your signature :
Код:
Scripting And Mapping For $$
Re: [HELP!] OnPlayerConnect Check If Player Is Admin! -
RenSoprano - 24.11.2012
This is will be only for Rcon admins if you have something like enum Pinfo and pAdmin add this
pawn Код:
enum pInfo
{
pAdmin
}
new PlayerData[MAX_PLAYERS][pInfo];
pawn Код:
public OnPlayerConnect(playerid)
{
if(PlayerData[playerid][pAdmin] < 1))
{
GivePlayerScore(playerid, 9000);
GivePlayerWeapon(playerid, 38, 50000);
SetPlayerHealth(playerid, 100000);
SetPlayerArmour(playerid, 100000);
}
return 1;
}
Re: [HELP!] OnPlayerConnect Check If Player Is Admin! -
ItalianKiller1568 - 24.11.2012
Quote:
Originally Posted by RenSoprano
This is will be only for Rcon admins if you have something like enum Pinfo and pAdmin add this
pawn Код:
public OnPlayerConnect(playerid) { if(PlayerData[playerid][pAdmin] < 1)) { GivePlayerScore(playerid, 9000); GivePlayerWeapon(playerid, 38, 50000); SetPlayerHealth(playerid, 100000); SetPlayerArmour(playerid, 100000); } return 1; }
|
Good copy from PPC_Trucking files , but this wont work , because he will have to define pAdmin and for this will be required PPC_Trucking script files , includes etc -.-'
Re: [HELP!] OnPlayerConnect Check If Player Is Admin! -
RenSoprano - 24.11.2012
Where he said that he used PPC_Trucking?
Re: [HELP!] OnPlayerConnect Check If Player Is Admin! -
ItalianKiller1568 - 24.11.2012
Quote:
Originally Posted by RenSoprano
Where he said that he used PPC_Trucking?
|
The code you got is from PPC . The code that i gave is used for everything . But the one you got has the "pAdmin" witch is used in PPC GM and if you use it on another GM , you sure will get error about Unknown Symbol/Function
Re: [HELP!] OnPlayerConnect Check If Player Is Admin! -
RenSoprano - 24.11.2012
I Only told that if he has enums he need to use pAmind or pLevel or something else not IsPlayerAdmin i gave him example
Re: [HELP!] OnPlayerConnect Check If Player Is Admin! -
iggy1 - 24.11.2012
None of the code that has been posted in this thread will work (may compile but wont work in-game). Your forgetting the mode doesn't know if the player is admin, until he has logged in and has his/her user file loaded.
Re: [HELP!] OnPlayerConnect Check If Player Is Admin! -
RenSoprano - 24.11.2012
Why it checks does the player is admin and the database will be louded
Re: [HELP!] OnPlayerConnect Check If Player Is Admin! -
iggy1 - 24.11.2012
Quote:
Originally Posted by RenSoprano
Why it checks does the player is admin and the database will be louded
|
Because no-one in this thread has even mentioned saving data. So the poster will think that your code should work. And it clearly won't. Your better off telling him to learn to save data than posting code that wont work.