Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #define FILTERSCRIPT
- #include <a_samp>
- #include <zcmd>
- #define red 0xFF0000AA
- #if defined FILTERSCRIPT
- public OnFilterScriptInit()
- {
- print("\n--------------------------------------");
- print(" Admin Commands Created By V_LOPE");
- print(" And Edited By Vlad");
- print(" 17 Admin Commands Loaded!");
- print("--------------------------------------\n");
- return 1;
- }
- public OnFilterScriptExit()
- {
- return 1;
- }
- #endif
- CMD:ban(playerid,params[])
- {
- if(IsPlayerAdmin(playerid))
- {
- new tmp[256], tmp2[256], Index;
- tmp = strtok(params,Index), tmp2 = strtok(params,Index);
- if(isnull(params)) return SendClientMessage(playerid, red, "USAGE: /ban [playerid] [reason]"); //Check If Player Does Not Added "Reason and the ID"
- new player1, playername[MAX_PLAYER_NAME], adminname[MAX_PLAYER_NAME], string[128];
- player1 = strval(tmp); // << player1 = ID of The Player
- if(!IsPlayerConnected(player1)) return SendClientMessage(playerid,red,"That player isn't connected!"); //<< Check If Player Connected Or Not
- GetPlayerName(player1, playername, sizeof(playername)); //get Selected Player Name
- GetPlayerName(playerid, adminname, sizeof(adminname)); //get Admin Name Who Use This command
- if(isnull(tmp2))
- format(string,sizeof(string),"AdmCmd: %s was banned by admin %s, Reason: (%s)",playername,adminname,params[2]); //adminname = the player Who Use This command || playername = the Player who Going To Be kicked || params[2] = The Reason Of The Kick
- SendClientMessageToAll(red,string); // Send Message To all Players.
- printf("AdmCmd: %s was banned by admin %s, Reason: (%s)",playername,adminname,params[2]);
- SetPlayerInterior (player1, 6);
- SetPlayerPos (player1, 264.2000122,77.6999969,1000.5999756);
- TogglePlayerControllable (player1, 0);
- SetPlayerSpecialAction (player1, SPECIAL_ACTION_CUFFED);
- Ban(player1);
- } else return SendClientMessage(playerid,red,"You are not authorized to use this command!"); // This Code return the Player IF he's not Login in as RCON admin
- return 1;
- }
- CMD:kick(playerid,params[])
- {
- if(IsPlayerAdmin(playerid))
- {
- new tmp[256], tmp2[256], Index;
- tmp = strtok(params,Index), tmp2 = strtok(params,Index);
- if(isnull(params)) return SendClientMessage(playerid, red, "USAGE: /kick [playerid] [reason]"); //Check If Player Does Not Added "Reason and the ID"
- new player1, playername[MAX_PLAYER_NAME], adminname[MAX_PLAYER_NAME], string[128];
- player1 = strval(tmp); // << player1 = ID of The Player
- if(!IsPlayerConnected(player1)) return SendClientMessage(playerid,red,"That player isn't connected!"); //<< Check If Player Connected Or Not
- GetPlayerName(player1, playername, sizeof(playername)); //get Selected Player Name
- GetPlayerName(playerid, adminname, sizeof(adminname)); //get Admin Name Who Use This command
- format(string,sizeof(string),"AdmCmd: %s was been kicked by admin %s, Reason: (%s)",playername,adminname,params[2]); //adminname = the player Who Use This command || playername = the Player who Going To Be kicked || params[2] = The Reason Of The Kick
- SendClientMessageToAll(red,string); // Send Message To all Players.
- printf("AdmCmd: %s was kicked by admin %s, Reason: (%s)",playername,adminname,params[2]);
- SetPlayerInterior (player1, 6);
- SetPlayerPos (player1, 264.2000122,77.6999969,1000.5999756);
- TogglePlayerControllable (player1, 0);
- SetPlayerSpecialAction (player1, SPECIAL_ACTION_CUFFED);
- Kick(player1);
- } else return SendClientMessage(playerid,red,"You are not authorized to use this command!"); // This Code return the Player IF he's not Login in as RCON admin
- return 1;
- }
- CMD:freeze(playerid,params[])
- {
- if(IsPlayerAdmin(playerid))
- {
- new tmp[256], tmp2[256], Index;
- tmp = strtok(params,Index), tmp2 = strtok(params,Index);
- if(isnull(params)) return SendClientMessage(playerid, red, "USAGE: /freeze [playerid] [reason]"); //Check If Player Does Not Added "Reason and the ID"
- new player1, playername[MAX_PLAYER_NAME], adminname[MAX_PLAYER_NAME], string[128];
- player1 = strval(tmp); // << player1 = ID of The Player
- if(!IsPlayerConnected(player1)) return SendClientMessage(playerid,red,"That player isn't connected!"); //<< Check If Player Connected Or Not
- GetPlayerName(player1, playername, sizeof(playername)); //get Selected Player Name
- GetPlayerName(playerid, adminname, sizeof(adminname)); //get Admin Name Who Use This command
- format(string,sizeof(string),"AdmCmd: %s was frozen by admin %s, Reason: (%s)",playername,adminname,params[2]); //adminname = the player Who Use This command || playername = the Player who Going To Be kicked || params[2] = The Reason Of The Kick
- SendClientMessageToAll(red,string); // Send Message To all Players.
- printf("AdmCmd: %s was frozen by admin %s, Reason: (%s)",playername,adminname,params[2]);
- TogglePlayerControllable(player1, 0);
- } else return SendClientMessage(playerid,red,"You are not authorized to use this command!"); // This Code return the Player IF he's not Login in as RCON admin
- return 1;
- }
- CMD:unfreeze(playerid,params[])
- {
- if(IsPlayerAdmin(playerid))
- {
- new tmp[256], tmp2[256], Index;
- tmp = strtok(params,Index), tmp2 = strtok(params,Index);
- if(isnull(params)) return SendClientMessage(playerid, red, "USAGE: /unfreeze [playerid] [reason]"); //Check If Player Does Not Added "Reason and the ID"
- new player1, playername[MAX_PLAYER_NAME], adminname[MAX_PLAYER_NAME], string[128];
- player1 = strval(tmp); // << player1 = ID of The Player
- if(!IsPlayerConnected(player1)) return SendClientMessage(playerid,red,"That player isn't connected!"); //<< Check If Player Connected Or Not
- GetPlayerName(player1, playername, sizeof(playername)); //get Selected Player Name
- GetPlayerName(playerid, adminname, sizeof(adminname)); //get Admin Name Who Use This command
- format(string,sizeof(string),"AdmCmd: %s was unfrozen by admin %s, Reason: (%s)",playername,adminname,params[2]); //adminname = the player Who Use This command || playername = the Player who Going To Be kicked || params[2] = The Reason Of The Kick
- SendClientMessageToAll(red,string); // Send Message To all Players.
- printf("AdmCmd: %s was unfrozen by admin %s, Reason: (%s)",playername,adminname,params[2]);
- TogglePlayerControllable(player1, 1);
- } else return SendClientMessage(playerid,red,"You are not authorized to use this command!"); // This Code return the Player IF he's not Login in as RCON admin
- return 1;
- }
- CMD:ahelp(playerid)
- {
- if(IsPlayerAdmin(playerid))
- {
- SendClientMessage(playerid,red, "|_________________________Admin Commands_________________________|");
- SendClientMessage(playerid,red, "Commands: /ahelp /ban /kick /freeze /unfreeze /getcash /jail");
- SendClientMessage(playerid,red, "Commands: /unjail /fly /clearchat /countdown /aweapon /explode");
- SendClientMessage(playerid,red, "Commands: /sendtospawn /sendtolspd /sendtolv /sendtolsair");
- SendClientMessage(playerid,red, "Commands: /sendtoairlv");
- } else return SendClientMessage(playerid,red,"You are not authorized to use this command!");
- return 1;
- }
- CMD:getcash(playerid,params[])
- {
- if(IsPlayerAdmin(playerid))
- {
- new tmp[256], tmp2[256], Index;
- tmp = strtok(params,Index), tmp2 = strtok(params,Index);
- if(isnull(params)) return SendClientMessage(playerid, red, "USAGE: /getcash [reason]"); //Check If Player Does Not Added "Reason and the ID"
- new player1, playername[MAX_PLAYER_NAME], adminname[MAX_PLAYER_NAME], string[128];
- player1 = strval(tmp); // << player1 = ID of The Player
- GetPlayerName(player1, playername, sizeof(playername)); //get Selected Player Name
- GetPlayerName(playerid, adminname, sizeof(adminname)); //get Admin Name Who Use This command
- format(string,sizeof(string),"AdmCmd: %s gave $1.000.000 to himself, Reason: (%s)",adminname,params[2]); //adminname = the player Who Use This command || playername = the Player who Going To Be kicked || params[2] = The Reason Of The Kick
- SendClientMessageToAll(red,string); // Send Message To all Players.
- printf("AdmCmd: %s gave $1.000.000 to himself, Reason: (%s)",adminname,params[2]);
- GivePlayerMoney(playerid, 1000000);
- } else return SendClientMessage(playerid,red,"You are not authorized to use this command!"); // This Code return the Player IF he's not Login in as RCON admin
- return 1;
- }
- CMD:jail(playerid,params[])
- {
- if(IsPlayerAdmin(playerid))
- {
- new tmp[256], tmp2[256], Index;
- tmp = strtok(params,Index), tmp2 = strtok(params,Index);
- if(isnull(params)) return SendClientMessage(playerid, red, "USAGE: /jail [playerid] [reason]"); //Check If Player Does Not Added "Reason and the ID"
- new player1, playername[MAX_PLAYER_NAME], adminname[MAX_PLAYER_NAME], string[128];
- player1 = strval(tmp); // << player1 = ID of The Player
- if(!IsPlayerConnected(player1)) return SendClientMessage(playerid,red,"That player isn't connected!"); //<< Check If Player Connected Or Not
- GetPlayerName(player1, playername, sizeof(playername)); //get Selected Player Name
- GetPlayerName(playerid, adminname, sizeof(adminname)); //get Admin Name Who Use This command
- format(string,sizeof(string),"AdmCmd: %s was jailed by admin %s, Reason: (%s)",playername,adminname,params[2]); //adminname = the player Who Use This command || playername = the Player who Going To Be kicked || params[2] = The Reason Of The Kick
- SendClientMessageToAll(red,string); // Send Message To all Players.
- printf("AdmCmd: %s was jailed by admin %s, Reason: (%s)",playername,adminname,params[2]);
- TogglePlayerControllable(player1, 0);
- SetPlayerInterior(player1, 6);
- SetPlayerPos (player1, 264.2000122,77.6999969,1000.5999756);
- SetPlayerSpecialAction(player1, SPECIAL_ACTION_CUFFED);
- SendClientMessage(player1,red,"JAIL: You were jailed by an admin!");
- SendClientMessage(player1,red,"JAIL: If you want to get out of jail talk with an admin!");
- } else return SendClientMessage(playerid,red,"You are not authorized to use this command!"); // This Code return the Player IF he's not Login in as RCON admin
- return 1;
- }
- CMD:unjail(playerid,params[])
- {
- if(IsPlayerAdmin(playerid))
- {
- new tmp[256], tmp2[256], Index;
- tmp = strtok(params,Index), tmp2 = strtok(params,Index);
- if(isnull(params)) return SendClientMessage(playerid, red, "USAGE: /unjail [playerid] [reason]"); //Check If Player Does Not Added "Reason and the ID"
- new player1, playername[MAX_PLAYER_NAME], adminname[MAX_PLAYER_NAME], string[128];
- player1 = strval(tmp); // << player1 = ID of The Player
- if(!IsPlayerConnected(player1)) return SendClientMessage(playerid,red,"That player isn't connected!"); //<< Check If Player Connected Or Not
- GetPlayerName(player1, playername, sizeof(playername)); //get Selected Player Name
- GetPlayerName(playerid, adminname, sizeof(adminname)); //get Admin Name Who Use This command
- format(string,sizeof(string),"AdmCmd: %s was unjailed by admin %s, Reason: (%s)",playername,adminname,params[2]); //adminname = the player Who Use This command || playername = the Player who Going To Be kicked || params[2] = The Reason Of The Kick
- SendClientMessageToAll(red,string); // Send Message To all Players.
- printf("AdmCmd: %s was unjailed by admin %s, Reason: (%s)",playername,adminname,params[2]);
- TogglePlayerControllable(player1, 1);
- SetPlayerInterior(player1, 0);
- SetPlayerSpecialAction(player1, SPECIAL_ACTION_NONE);
- SetPlayerPos (player1, 1545.2037,-1675.7291,13.5599);
- } else return SendClientMessage(playerid,red,"You are not authorized to use this command!"); // This Code return the Player IF he's not Login in as RCON admin
- return 1;
- }
- CMD:fly(playerid,params[])
- {
- if(IsPlayerAdmin(playerid))
- {
- new tmp[256], tmp2[256], Index;
- tmp = strtok(params,Index), tmp2 = strtok(params,Index);
- if(isnull(params)) return SendClientMessage(playerid, red, "USAGE: /fly [playerid] [reason]"); //Check If Player Does Not Added "Reason and the ID"
- new player1, playername[MAX_PLAYER_NAME], adminname[MAX_PLAYER_NAME], string[128];
- player1 = strval(tmp); // << player1 = ID of The Player
- if(!IsPlayerConnected(player1)) return SendClientMessage(playerid,red,"That player isn't connected!"); //<< Check If Player Connected Or Not
- GetPlayerName(player1, playername, sizeof(playername)); //get Selected Player Name
- GetPlayerName(playerid, adminname, sizeof(adminname)); //get Admin Name Who Use This command
- format(string,sizeof(string),"AdmCmd: Admin %s has teleported you, Reason: (%s). Have a nice fall!",adminname,params[2]); //adminname = the player Who Use This command || playername = the Player who Going To Be kicked || params[2] = The Reason Of The Kick
- SendClientMessage(player1,red,string); // Send Message
- printf("AdmCmd: Admin %s threw %s in the air, Reason: (%s)",adminname,playername,params[2]);
- GivePlayerWeapon(player1, 46, 1);
- SetPlayerPos (player1, 1481.8000488,-1662.5999756,1183.3000488);
- } else return SendClientMessage(playerid,red,"You are not authorized to use this command!"); // This Code return the Player IF he's not Login in as RCON admin
- return 1;
- }
- CMD:clearchat(playerid,params[])
- {
- if(IsPlayerAdmin(playerid))
- {
- new tmp[256], tmp2[256], Index;
- tmp = strtok(params,Index), tmp2 = strtok(params,Index);
- if(isnull(params)) return SendClientMessage(playerid, red, "USAGE: /clearchat [reason]"); //Check If Player Does Not Added "Reason and the ID"
- new player1, playername[MAX_PLAYER_NAME], adminname[MAX_PLAYER_NAME], string[128];
- player1 = strval(tmp); // << player1 = ID of The Player
- GetPlayerName(player1, playername, sizeof(playername)); //get Selected Player Name
- GetPlayerName(playerid, adminname, sizeof(adminname)); //get Admin Name Who Use This command
- SendClientMessageToAll(red," ");
- SendClientMessageToAll(red," ");
- SendClientMessageToAll(red," ");
- SendClientMessageToAll(red," ");
- SendClientMessageToAll(red," ");
- SendClientMessageToAll(red," ");
- SendClientMessageToAll(red," ");
- SendClientMessageToAll(red," ");
- SendClientMessageToAll(red," ");
- SendClientMessageToAll(red," ");
- SendClientMessageToAll(red," ");
- SendClientMessageToAll(red," ");
- SendClientMessageToAll(red," ");
- SendClientMessageToAll(red," ");
- SendClientMessageToAll(red," ");
- SendClientMessageToAll(red," ");
- SendClientMessageToAll(red," ");
- SendClientMessageToAll(red," ");
- SendClientMessageToAll(red," ");
- SendClientMessageToAll(red," ");
- SendClientMessageToAll(red," ");
- SendClientMessageToAll(red," ");
- SendClientMessageToAll(red," ");
- SendClientMessageToAll(red," ");
- SendClientMessageToAll(red," ");
- SendClientMessageToAll(red," ");
- SendClientMessageToAll(red," ");
- SendClientMessageToAll(red," ");
- SendClientMessageToAll(red," ");
- SendClientMessageToAll(red," ");
- SendClientMessageToAll(red," ");
- SendClientMessageToAll(red," ");
- SendClientMessageToAll(red," ");
- SendClientMessageToAll(red," ");
- SendClientMessageToAll(red," ");
- SendClientMessageToAll(red," ");
- SendClientMessageToAll(red," ");
- SendClientMessageToAll(red," ");
- SendClientMessageToAll(red," ");
- SendClientMessageToAll(red," ");
- SendClientMessageToAll(red," ");
- SendClientMessageToAll(red," ");
- SendClientMessageToAll(red," ");
- SendClientMessageToAll(red," ");
- SendClientMessageToAll(red," ");
- SendClientMessageToAll(red," ");
- SendClientMessageToAll(red," ");
- SendClientMessageToAll(red," ");
- SendClientMessageToAll(red," ");
- SendClientMessageToAll(red," ");
- SendClientMessageToAll(red," ");
- SendClientMessageToAll(red," ");
- SendClientMessageToAll(red," ");
- SendClientMessageToAll(red," ");
- SendClientMessageToAll(red," ");
- SendClientMessageToAll(red," ");
- SendClientMessageToAll(red," ");
- SendClientMessageToAll(red," ");
- SendClientMessageToAll(red," ");
- SendClientMessageToAll(red," ");
- SendClientMessageToAll(red," ");
- SendClientMessageToAll(red," ");
- SendClientMessageToAll(red," ");
- SendClientMessageToAll(red," ");
- SendClientMessageToAll(red," ");
- SendClientMessageToAll(red," ");
- SendClientMessageToAll(red," ");
- SendClientMessageToAll(red," ");
- SendClientMessageToAll(red," ");
- SendClientMessageToAll(red," ");
- SendClientMessageToAll(red," ");
- SendClientMessageToAll(red," ");
- SendClientMessageToAll(red," ");
- SendClientMessageToAll(red," ");
- SendClientMessageToAll(red," ");
- SendClientMessageToAll(red," ");
- SendClientMessageToAll(red," ");
- SendClientMessageToAll(red," ");
- SendClientMessageToAll(red," ");
- SendClientMessageToAll(red," ");
- SendClientMessageToAll(red," ");
- SendClientMessageToAll(red," ");
- SendClientMessageToAll(red," ");
- SendClientMessageToAll(red," ");
- SendClientMessageToAll(red," ");
- SendClientMessageToAll(red," ");
- SendClientMessageToAll(red," ");
- SendClientMessageToAll(red," ");
- SendClientMessageToAll(red," ");
- SendClientMessageToAll(red," ");
- SendClientMessageToAll(red," ");
- SendClientMessageToAll(red," ");
- SendClientMessageToAll(red," ");
- SendClientMessageToAll(red," ");
- SendClientMessageToAll(red," ");
- SendClientMessageToAll(red," ");
- SendClientMessageToAll(red," ");
- SendClientMessageToAll(red," ");
- SendClientMessageToAll(red," ");
- SendClientMessageToAll(red," ");
- SendClientMessageToAll(red," ");
- SendClientMessageToAll(red," ");
- SendClientMessageToAll(red," ");
- SendClientMessageToAll(red," ");
- SendClientMessageToAll(red," ");
- SendClientMessageToAll(red," ");
- SendClientMessageToAll(red," ");
- SendClientMessageToAll(red," ");
- SendClientMessageToAll(red," ");
- SendClientMessageToAll(red," ");
- format(string,sizeof(string),"AdmCmd: The chat was cleared by %s",adminname); //adminname = the player Who Use This command || playername = the Player who Going To Be kicked || params[2] = The Reason Of The Kick
- SendClientMessageToAll(red,string); // Send Message To all Players.
- printf("AdmCmd: %s cleared the chat, Reason: (%s)",adminname,params[2]);
- } else return SendClientMessage(playerid,red,"You are not authorized to use this command!"); // This Code return the Player IF he's not Login in as RCON admin
- return 1;
- }
- CMD:aweapon(playerid,params[])
- {
- if(IsPlayerAdmin(playerid))
- {
- new tmp[256], tmp2[256], Index;
- tmp = strtok(params,Index), tmp2 = strtok(params,Index);
- if(isnull(params)) return SendClientMessage(playerid, red, "USAGE: /aweapon [reason]"); //Check If Player Does Not Added "Reason and the ID"
- new player1, playername[MAX_PLAYER_NAME], adminname[MAX_PLAYER_NAME], string[128];
- player1 = strval(tmp); // << player1 = ID of The Player
- GetPlayerName(player1, playername, sizeof(playername)); //get Selected Player Name
- GetPlayerName(playerid, adminname, sizeof(adminname)); //get Admin Name Who Use This command
- GivePlayerWeapon (playerid, 38, 99999);
- GivePlayerWeapon (playerid, 39, 99999);
- GivePlayerWeapon (playerid, 41, 99999);
- GivePlayerWeapon (playerid, 45, 1);
- GivePlayerWeapon (playerid, 34, 99999);
- GivePlayerWeapon (playerid, 31, 99999);
- GivePlayerWeapon (playerid, 29, 99999);
- GivePlayerWeapon (playerid, 27, 99999);
- GivePlayerWeapon (playerid, 24, 99999);
- GivePlayerWeapon (playerid, 1, 1);
- GivePlayerWeapon (playerid, 9, 1);
- format(string,sizeof(string),"AdmCmd: Admin %s gave himself a lot of weapons, Reason: (%s)",adminname,params[2]);
- SendClientMessageToAll (red,string);
- printf("AdmCmd: %s gave himself a lot of weapons, Reason: (%s)",adminname,params[2]);
- } else return SendClientMessage(playerid,red,"You are not authorized to use this command!");
- return 1;
- }
- CMD:explode(playerid,params[])
- {
- if(IsPlayerAdmin(playerid))
- {
- new tmp[256], tmp2[256], Index;
- tmp = strtok(params,Index), tmp2 = strtok(params,Index);
- if(isnull(params)) return SendClientMessage(playerid, red, "USAGE: /explode [playerid] [reason]"); //Check If Player Does Not Added "Reason and the ID"
- new player1, playername[MAX_PLAYER_NAME], adminname[MAX_PLAYER_NAME], string[128];
- player1 = strval(tmp); // << player1 = ID of The Player
- if(!IsPlayerConnected(player1)) return SendClientMessage(playerid,red,"That player isn't connected!"); //<< Check If Player Connected Or Not
- GetPlayerName(player1, playername, sizeof(playername)); //get Selected Player Name
- GetPlayerName(playerid, adminname, sizeof(adminname)); //get Admin Name Who Use This command
- format(string,sizeof(string),"AdmCmd: Admin %s has killed you! Reason: (%s)",adminname,params[2]); //adminname = the player Who Use This command || playername = the Player who Going To Be kicked || params[2] = The Reason Of The Kick
- SendClientMessage(player1,red,string);
- printf("AdmCmd: Admin %s used /explode on %s, Reason: (%s)",adminname,playername,params[2]);
- SetPlayerArmour(player1, 0);
- SetPlayerHealth(player1, 0);
- } else return SendClientMessage(playerid,red,"You are not authorized to use this command!"); // This Code return the Player IF he's not Login in as RCON admin
- return 1;
- }
- CMD:sendtospawn(playerid,params[])
- {
- if(IsPlayerAdmin(playerid))
- {
- new tmp[256], tmp2[256], Index;
- tmp = strtok(params,Index), tmp2 = strtok(params,Index);
- if(isnull(params)) return SendClientMessage(playerid, red, "USAGE: /sendtols [playerid] [reason]"); //Check If Player Does Not Added "Reason and the ID"
- new player1, playername[MAX_PLAYER_NAME], adminname[MAX_PLAYER_NAME], string[128];
- player1 = strval(tmp); // << player1 = ID of The Player
- if(!IsPlayerConnected(player1)) return SendClientMessage(playerid,red,"That player isn't connected!"); //<< Check If Player Connected Or Not
- GetPlayerName(player1, playername, sizeof(playername)); //get Selected Player Name
- GetPlayerName(playerid, adminname, sizeof(adminname)); //get Admin Name Who Use This command
- format(string,sizeof(string),"AdmCmd: Admin %s has sent you to LS! Reason: (%s)",adminname,params[2]); //adminname = the player Who Use This command || playername = the Player who Going To Be kicked || params[2] = The Reason Of The Kick
- SendClientMessage(player1,red,string);
- printf("AdmCmd: Admin %s sent %s to LS(spawn), Reason: (%s)",adminname,playername,params[2]);
- SetPlayerPos (player1, 1310.1509,-1367.6149,13.5383);
- } else return SendClientMessage(playerid,red,"You are not authorized to use this command!"); // This Code return the Player IF he's not Login in as RCON admin
- return 1;
- }
- CMD:sendtopdls(playerid,params[])
- {
- if(IsPlayerAdmin(playerid))
- {
- new tmp[256], tmp2[256], Index;
- tmp = strtok(params,Index), tmp2 = strtok(params,Index);
- if(isnull(params)) return SendClientMessage(playerid, red, "USAGE: /sendtolspd [playerid] [reason]"); //Check If Player Does Not Added "Reason and the ID"
- new player1, playername[MAX_PLAYER_NAME], adminname[MAX_PLAYER_NAME], string[128];
- player1 = strval(tmp); // << player1 = ID of The Player
- if(!IsPlayerConnected(player1)) return SendClientMessage(playerid,red,"That player isn't connected!"); //<< Check If Player Connected Or Not
- GetPlayerName(player1, playername, sizeof(playername)); //get Selected Player Name
- GetPlayerName(playerid, adminname, sizeof(adminname)); //get Admin Name Who Use This command
- format(string,sizeof(string),"AdmCmd: Admin %s has sent you to LSPD! Reason: (%s)",adminname,params[2]); //adminname = the player Who Use This command || playername = the Player who Going To Be kicked || params[2] = The Reason Of The Kick
- SendClientMessage(player1,red,string);
- printf("AdmCmd: Admin %s sent %s to Los Santos Police Department, Reason: (%s)",adminname,playername,params[2]);
- SetPlayerPos (player1, 1545.2037,-1675.7291,13.5599);
- } else return SendClientMessage(playerid,red,"You are not authorized to use this command!"); // This Code return the Player IF he's not Login in as RCON admin
- return 1;
- }
- CMD:sendtolsair(playerid,params[])
- {
- if(IsPlayerAdmin(playerid))
- {
- new tmp[256], tmp2[256], Index;
- tmp = strtok(params,Index), tmp2 = strtok(params,Index);
- if(isnull(params)) return SendClientMessage(playerid, red, "USAGE: /sendtolsair [playerid] [reason]"); //Check If Player Does Not Added "Reason and the ID"
- new player1, playername[MAX_PLAYER_NAME], adminname[MAX_PLAYER_NAME], string[128];
- player1 = strval(tmp); // << player1 = ID of The Player
- if(!IsPlayerConnected(player1)) return SendClientMessage(playerid,red,"That player isn't connected!"); //<< Check If Player Connected Or Not
- GetPlayerName(player1, playername, sizeof(playername)); //get Selected Player Name
- GetPlayerName(playerid, adminname, sizeof(adminname)); //get Admin Name Who Use This command
- format(string,sizeof(string),"AdmCmd: Admin %s has sent you to LSAIRPORT! Reason: (%s)",adminname,params[2]); //adminname = the player Who Use This command || playername = the Player who Going To Be kicked || params[2] = The Reason Of The Kick
- SendClientMessage(player1,red,string);
- printf("AdmCmd: Admin %s sent %s to Los Santos Airport, Reason: (%s)",adminname,playername,params[2]);
- SetPlayerPos (player1, 1937.3033,-2339.5210,13.5469);
- } else return SendClientMessage(playerid,red,"You are not authorized to use this command!"); // This Code return the Player IF he's not Login in as RCON admin
- return 1;
- }
- CMD:sendtoairlv(playerid,params[])
- {
- if(IsPlayerAdmin(playerid))
- {
- new tmp[256], tmp2[256], Index;
- tmp = strtok(params,Index), tmp2 = strtok(params,Index);
- if(isnull(params)) return SendClientMessage(playerid, red, "USAGE: /sendtoairlv [playerid] [reason]"); //Check If Player Does Not Added "Reason and the ID"
- new player1, playername[MAX_PLAYER_NAME], adminname[MAX_PLAYER_NAME], string[128];
- player1 = strval(tmp); // << player1 = ID of The Player
- if(!IsPlayerConnected(player1)) return SendClientMessage(playerid,red,"That player isn't connected!"); //<< Check If Player Connected Or Not
- GetPlayerName(player1, playername, sizeof(playername)); //get Selected Player Name
- GetPlayerName(playerid, adminname, sizeof(adminname)); //get Admin Name Who Use This command
- format(string,sizeof(string),"AdmCmd: Admin %s has sent you to LVAIRPORT! Reason: (%s)",adminname,params[2]); //adminname = the player Who Use This command || playername = the Player who Going To Be kicked || params[2] = The Reason Of The Kick
- SendClientMessage(player1,red,string);
- printf("AdmCmd: Admin %s sent %s to Las Venturas Airport, Reason: (%s)",adminname,playername,params[2]);
- SetPlayerPos (player1, 1681.0872,1447.7493,10.7731);
- } else return SendClientMessage(playerid,red,"You are not authorized to use this command!"); // This Code return the Player IF he's not Login in as RCON admin
- return 1;
- }
- CMD:sendtolv(playerid,params[])
- {
- if(IsPlayerAdmin(playerid))
- {
- new tmp[256], tmp2[256], Index;
- tmp = strtok(params,Index), tmp2 = strtok(params,Index);
- if(isnull(params)) return SendClientMessage(playerid, red, "USAGE: /sendtolv [playerid] [reason]"); //Check If Player Does Not Added "Reason and the ID"
- new player1, playername[MAX_PLAYER_NAME], adminname[MAX_PLAYER_NAME], string[128];
- player1 = strval(tmp); // << player1 = ID of The Player
- if(!IsPlayerConnected(player1)) return SendClientMessage(playerid,red,"That player isn't connected!"); //<< Check If Player Connected Or Not
- GetPlayerName(player1, playername, sizeof(playername)); //get Selected Player Name
- GetPlayerName(playerid, adminname, sizeof(adminname)); //get Admin Name Who Use This command
- format(string,sizeof(string),"AdmCmd: Admin %s has sent you to LV! Reason: (%s)",adminname,params[2]); //adminname = the player Who Use This command || playername = the Player who Going To Be kicked || params[2] = The Reason Of The Kick
- SendClientMessage(player1,red,string);
- printf("AdmCmd: Admin %s sent %s to Las Venturas, Reason: (%s)",adminname,playername,params[2]);
- SetPlayerPos (player1, 2029.8820,1007.4957,10.8203);
- } else return SendClientMessage(playerid,red,"You are not authorized to use this command!"); // This Code return the Player IF he's not Login in as RCON admin
- return 1;
- }
- strtok(const string[], &index)
- {
- new length = strlen(string);
- while ((index < length) && (string[index] <= ' '))
- {
- index++;
- }
- new offset = index;
- new result[20];
- while ((index < length) && (string[index] > ' ') && ((index - offset) < (sizeof(result) - 1)))
- {
- result[index - offset] = string[index];
- index++;
- }
- result[index - offset] = EOS;
- return result;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement