Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //---------------------getip------------------
- if(strcmp(cmd, "/getip", true) == 0)
- {
- if (PlayerInfo[playerid][pAdmin] >= 2)
- {
- tmp = strtok(cmdtext,idx);
- new playersip[256];
- if(!strlen(tmp))
- {
- SendClientMessage(playerid,COLOR_GRAD1,"USAGE: /getip [Players ID]");
- return 1;
- }
- giveplayerid = ReturnUser(tmp);
- GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer));
- GetPlayerIp( giveplayerid,playersip,sizeof(playersip));
- format(string, sizeof(string), "Player: %s IP: %s",giveplayer,playersip);
- SendClientMessage(playerid,COLOR_GRAD2,string);
- }
- return 1;
- }
- //----------------------------------[GETHERE]-----------------------------------------------
- if(strcmp(cmd, "/gethere", true) == 0)
- {
- if(IsPlayerConnected(playerid))
- {
- tmp = strtok(cmdtext, idx);
- if(!strlen(tmp))
- {
- SendClientMessage(playerid, COLOR_GRAD2, "USAGE: /gethere [playerid/PartOfName]");
- return 1;
- }
- new Float:plocx,Float:plocy,Float:plocz;
- new plo;
- plo = ReturnUser(tmp);
- if (IsPlayerConnected(plo))
- {
- if(plo != INVALID_PLAYER_ID)
- {
- if (PlayerInfo[plo][pAdmin] > 7)
- {
- SendClientMessage(playerid, COLOR_GRAD1, "Ask the admin to goto you.");
- return 1;
- }
- if (PlayerInfo[playerid][pAdmin] >= 3 || PlayerInfo[playerid][pHelper] >= 3)
- {
- GetPlayerPos(playerid, plocx, plocy, plocz);
- if(PlayerInfo[playerid][pInt] > 0)
- {
- SetPlayerInterior(plo,PlayerInfo[playerid][pInt]);
- PlayerInfo[plo][pInt] = PlayerInfo[playerid][pInt];
- PlayerInfo[plo][pLocal] = PlayerInfo[playerid][pLocal];
- }
- if(PlayerInfo[playerid][pInt] == 0)
- {
- SetPlayerInterior(plo,0);
- }
- if(plocz > 930.0 && PlayerInfo[playerid][pInt] == 0) //the highest land point in sa = 526.8
- {
- SetPlayerInterior(plo,1);
- PlayerInfo[plo][pInt] = 1;
- }
- if (GetPlayerState(plo) == 2)
- {
- TelePos[plo][0] = 0.0;
- TelePos[plo][1] = 0.0;
- new tmpcar = GetPlayerVehicleID(plo);
- SetVehiclePos(tmpcar, plocx, plocy+4, plocz);
- }
- else
- {
- SetPlayerPos(plo,plocx,plocy+2, plocz);
- }
- SendClientMessage(plo, COLOR_GRAD1, " You have been teleported");
- }
- else
- {
- SendClientMessage(playerid, COLOR_GRAD1, " you are not authorized to use that command!");
- }
- }
- }
- else
- {
- format(string, sizeof(string), " %d is not an active player.", plo);
- SendClientMessage(playerid, COLOR_GRAD1, string);
- }
- }
- return 1;
- }
- if(strcmp(cmd, "/getallhere", true) == 0)
- {
- if(IsPlayerConnected(playerid))
- {
- if(PlayerInfo[playerid][pAdmin] >= 5)
- {
- GetPlayerName(playerid, sendername, sizeof(sendername));
- for(new i = 0; i < MAX_PLAYERS; i ++)
- {
- if(IsPlayerConnected(i))
- {
- format(string, 256, "Administrator %s has teleported everyone to himself.", sendername);
- BroadCast(COLOR_LIGHTRED,string);
- new Float:ix, Float:iy, Float:iz;
- GetPlayerPos(playerid, ix, iy, iz);
- SetPlayerInterior(i, GetPlayerInterior(playerid));
- SetPlayerPos(i, ix, iy, iz+1);
- GetPlayerName(playerid, sendername, sizeof(sendername));
- printf("[Warning] %s has teleported all players to him", sendername);
- ABroadCast(COLOR_LIGHTRED,string,1);
- }
- }
- }
- else
- {
- SendClientMessage(playerid, COLOR_RED, "You do not have permission to use that command!");
- }
- }
- else
- {
- SendClientMessage(playerid, COLOR_RED, "You Must be logged in to use this command!");
- }
- return 1;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement