Quesooo Posted May 14, 2017 Posted May 14, 2017 good day masters is this possible??? when the player is lvl 1 only he/she cant use commands unless he reach a base lvl of 20?? commands can be use starting from lvl20 up to max lvl thank you Quote
0 Emistry Posted May 21, 2017 Posted May 21, 2017 - script commands_start -1,{ OnPCBaseLvUpEvent: if ( BaseLevel >= 20 && getgroupid(0) == 0 ) { query_sql("UPDATE `login` SET `group_id` = 1 WHERE `account_id` ="+getcharid(3)+""); announce strcharinfo(0)+" has unlocked player commands",0; dispbottom "congratulations! now you need to relog to use commands"; } end; } add the groupid checking before alter the groupid, this help to prevent the script affecting any GM in case they level up their characters, or cases where player assigned to different group id that isn't equal to 0. 2 Quote
1 Cyro Posted May 14, 2017 Posted May 14, 2017 (edited) - script commands_start -1,{ OnPCBaseLvUpEvent: if ( BaseLevel >= 20 ) { query_sql("UPDATE `login` SET `group_id` = 1 WHERE `account_id` ="+getcharid(3)+""); announce strcharinfo(0)+" has unlocked player commands",0; dispbottom "congratulations! now you need to relog to use commands"; end; } } give commands to group one instead of group 0, so when they reach level 20 script change groupid to 1 ( i didn't test the script though ) Edited May 14, 2017 by Cyro 1 Quote
Question
Quesooo
good day masters is this possible???
when the player is lvl 1 only he/she cant use commands unless he reach a base lvl of 20??
commands can be use starting from lvl20 up to max lvl thank you
2 answers to this question
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.