Jump to content
  • 0

Getcharid on commands


PewN

Question


  • Group:  Members
  • Topic Count:  209
  • Topics Per Day:  0.04
  • Content Count:  892
  • Reputation:   27
  • Joined:  12/09/11
  • Last Seen:  

i have a @itemmap command i want to lock this command that only this account id can @itemmap

example:

Admin A = Account ID 2000000 ( 99 )

Admin B = Account ID 2000001 ( 99 )

Admin C = Account ID 2000002 ( 99 )

Only Admin A and B can use the @itemmap , if Admin C use the command nothing will work.

Thanks!

Link to comment
Share on other sites

3 answers to this question

Recommended Posts


  • Group:  Members
  • Topic Count:  18
  • Topics Per Day:  0.00
  • Content Count:  2044
  • Reputation:   682
  • Joined:  10/09/12
  • Last Seen:  

in scripts

if ( getcharid(3) == ...

in source

if ( sd->status.account_id == ...

I think you can figure out

  • Upvote 1
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  17
  • Topics Per Day:  0.00
  • Content Count:  754
  • Reputation:   186
  • Joined:  05/22/12
  • Last Seen:  

Actually, this is what the new permission system for. You can have 2 groups of both gm level 99, then turn off itemmap on one of them.

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  209
  • Topics Per Day:  0.04
  • Content Count:  892
  • Reputation:   27
  • Joined:  12/09/11
  • Last Seen:  

Actually, this is what the new permission system for. You can have 2 groups of both gm level 99, then turn off itemmap on one of them.

ah how can i do that if there's 2 lvl 99 gm. how can i set the other to lvl 99?

in scripts

if ( getcharid(3) == ...

in source

if ( sd->status.account_id == ...

I think you can figure out

how can i add a message on the chat log?


   if ( sd->status.account_id != 2000000 )
{
  add a message?
   break;
}
the source

l

in scripts

if ( getcharid(3) == ...

in source

if ( sd->status.account_id == ...

I think you can figure out

what wil i use return -1; or break; ? sorry im still newbie on src

Problem Solved! thanks for your fast reply i figured it out :)

Edited by TrojanWorm
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...