Posts: 147
Threads: 38
Joined: Jul 2015
Reputation:
0
What funcs are used? like Native GetPlayerStats
and like if we want to create a command and use this code
if [playerData][playerLevel] >= 3 //admin lvl
SendClientMessage(playerid, "You don't have enough administration level to use this command");
Else
SendClientMessage(playerid, "command success" smth like dat..
Posts: 596
Threads: 75
Joined: Nov 2015
15.09.2016, 06:27
(
Последний раз редактировалось K0P; 15.09.2016 в 14:18.
)
Код:
CMD:yourcommand(playerid, params[]) //ZCMD
{
if(PlayerData[playerid][PlayerLevel] >= 3)
{
//Do your stuff here
}
else SendClientMessage(playerid, 0xFFFFFFFF, "You don't have enough administration level to use this command");
return 1;
}
Here i made a quick stock (Sorry if there is a mistake) which you can use to prevent writing the above code again and again in each admin command.
Код:
CheckLevel(playerid, level)
{
if(PlayerData[playerid][PlayerLevel] >= level) return 1;
else
{
SendClientMessage(playerid, 0xFFFFFFFF, "You don't have enough administration level to use this command");
return 0;
}
}
After adding this stock in your gamemode/script,you will just need this one line of code to check if player has admin level "-" or not:
Код:
CMD:yourcommand(playerid, params[])
{
CheckLevel(playerid, 3);
return 1;
}
Posts: 311
Threads: 27
Joined: May 2016
Reputation:
0
XhunterZ please get some help from wiki for mySQL. If you make command or update and if bug comes up, you won't be able to solve it.
CNRSF is your project how I see.
"one day you will face bug which you wont be able to solve" - SecretBoss.
Just kidding, go on we won't stop you from risking script and stuff.
Posts: 147
Threads: 38
Joined: Jul 2015
Reputation:
0
You're wrong, i'm just learning and will create a gamemode from scratch, i got 2 friends who script for me..
Posts: 311
Threads: 27
Joined: May 2016
Reputation:
0
I'd love to check out. CNRSF has same valutes as your gamemode.
You got 2 friends who script for you? Why don't you learn it and make your gamemode.
Anways about Lorenc he is like that sorry, His Irressiable Gaming is like that.
You wasted cash you could use for your own community. Thats why I never donated to any community.
Posts: 596
Threads: 75
Joined: Nov 2015
Quote:
Originally Posted by GoldenLion
|
Oh didn't noticed,thanks for sharing.