Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //replace gamertags with the yodada & yomamas
- // add these in your bottom of vars.h or somewhere global
- void is_player_admin(int playerid){
- if(COMPARE_STRING(GET_PLAYER_NAME(playerid),"Yodada_69")) return true; //1
- if(COMPARE_STRING(GET_PLAYER_NAME(playerid),"Yomama_1")) return 2;
- if(COMPARE_STRING(GET_PLAYER_NAME(playerid),"Yomama_2")) return 3;
- if(COMPARE_STRING(GET_PLAYER_NAME(playerid),"Yomama_3")) return 4;
- return false; //0
- }
- bool player_admin = false;
- //make necessary changes to gamertags and add to bottom of vars.h
- void print_player_admin(void){
- if(!player_admin){
- for(i = 0; i<16; i++){
- if(!IS_NETWORK_PLAYER_ACTIVE(i)) continue;
- if (i == GetPlayerIndex()) continue;
- if(is_player_admin(i) == 1) { //gamertag Yodada_69
- print("Yodada_69 in da house!");
- player_admin = true;
- return;
- }
- else if(is_player_admin(i) == 2) { //gamertag Yomama_1
- print("Yomama_1 in da house!");
- player_admin = true;
- return;
- }
- else if(is_player_admin(i) == 2) { //gamertag Yomama_2
- print("Yomama_2 in da house!");
- player_admin = true;
- return;
- }
- else if(is_player_admin(i) == 4) { //gamertag Yomama_3
- print("Yomama_3 in da house!");
- player_admin = true;
- return;
- }
- }
- }
- else{
- player_admin = false
- for(i = 0; i<16; i++) if(is_player_admin(i) > 0){
- player_admin = true;
- return;
- }
- }
- return;
- }
- //put this in the main(void)
- print_player_admin();
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement