| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333 |
- CMD:tp(playerid, params[])
- {
- if (Players[playerid][pAdmin] < 1)
- {
- return SendErrorMessage(playerid, "You are not privileged to use this command.");
- }
- else
- {
- Dialog_Show(playerid, Teleport, DIALOG_STYLE_LIST, "{6688FF}Teleports", "Teleport List\nStatic Buildings\nInteriors", "Select", "Cancel");
- }
- return 1;
- }
- CMD:goto(playerid, params[])
- {
- new targetid;
- if (Players[playerid][pAdmin] < 1)
- {
- return SendErrorMessage(playerid, "You are not privileged to use this command.");
- }
- else if (sscanf(params, "u", targetid))
- {
- return SendSyntaxMessage(playerid, "/goto [playerid/name]");
- }
- else if (!IsPlayerConnected(targetid))
- {
- return SendErrorMessage(playerid, "The specified target doesn't exist.");
- }
- else if (!IsPlayerLoggedIn(targetid))
- {
- return SendErrorMessage(playerid, "The specified target is not logged in yet.");
- }
- else if (!IsPlayerSpawned(targetid))
- {
- return SendErrorMessage(playerid, "The specified target is not spawned.");
- }
- else if (!Players[targetid][pSetupInfo])
- {
- return SendErrorMessage(playerid, "The specified target is setting up their character.");
- }
- else if (Players[targetid][pSpectate] != INVALID_PLAYER_ID)
- {
- return SendErrorMessage(playerid, "The specified target is currently spectating.");
- }
- else
- {
- TeleportToPlayer(playerid, targetid);
- SendInfoMessage(playerid, "You have warped to %s's location.", ReturnNameEx(targetid, 0));
- }
- return 1;
- }
- CMD:get(playerid, params[])
- {
- new targetid;
- if (Players[playerid][pAdmin] < 1)
- {
- return SendErrorMessage(playerid, "You are not privileged to use this command.");
- }
- else if (sscanf(params, "u", targetid))
- {
- return SendSyntaxMessage(playerid, "/get [playerid/name]");
- }
- else if (!IsPlayerConnected(targetid))
- {
- return SendErrorMessage(playerid, "The specified target doesn't exist.");
- }
- else if (IsPlayerNPC(targetid))
- {
- return SendErrorMessage(playerid, "You cannot use this command on a NPC.");
- }
- else if (!IsPlayerLoggedIn(targetid))
- {
- return SendErrorMessage(playerid, "The specified target is not logged in yet.");
- }
- else if (!IsPlayerSpawned(targetid))
- {
- return SendErrorMessage(playerid, "The specified target is not spawned.");
- }
- else if (Players[targetid][pAdmin] > Players[playerid][pAdmin])
- {
- return SendErrorMessage(playerid, "The specified target has a higher admin level.");
- }
- else
- {
- TeleportToPlayer(targetid, playerid);
- SendInfoMessage(playerid, "You have warped %s to your location.", ReturnNameEx(targetid, 0));
- }
- return 1;
- }
- CMD:sendspawn(playerid, params[])
- {
- new targetid;
- if (Players[playerid][pAdmin] < 2)
- {
- return SendErrorMessage(playerid, "You are not privileged to use this command.");
- }
- else if (sscanf(params, "u", targetid))
- {
- return SendSyntaxMessage(playerid, "/sendspawn [playerid/name]");
- }
- else if (!IsPlayerConnected(targetid))
- {
- return SendErrorMessage(playerid, "The specified target doesn't exist.");
- }
- else if (!IsPlayerLoggedIn(targetid))
- {
- return SendErrorMessage(playerid, "The specified target is not logged in yet.");
- }
- else if (Players[targetid][pJailType] != 0)
- {
- return SendErrorMessage(playerid, "The specified target is currently in jail.");
- }
- else if (!IsPlayerSpawned(targetid))
- {
- return SendErrorMessage(playerid, "The specified target is not spawned.");
- }
- else
- {
- SendToDefaultSpawn(targetid);
- SendInfoMessage(playerid, "You have sent %s to the default spawn.", ReturnNameEx(targetid, 0));
- SendInfoMessage(targetid, "You have been sent to the default spawn.");
- }
- return 1;
- }
- CMD:setworld(playerid, params[])
- {
- new targetid, vw;
- if (Players[playerid][pAdmin] < 2)
- {
- return SendErrorMessage(playerid, "You are not privileged to use this command.");
- }
- else if (sscanf(params, "ui", targetid, vw))
- {
- return SendSyntaxMessage(playerid, "/setworld [playerid/name] [virtual]");
- }
- else if (!IsPlayerConnected(targetid))
- {
- return SendErrorMessage(playerid, "The specified target doesn't exist.");
- }
- else if (IsPlayerNPC(targetid))
- {
- return SendErrorMessage(playerid, "You cannot use this command on a NPC.");
- }
- else if (!IsPlayerLoggedIn(targetid))
- {
- return SendErrorMessage(playerid, "The specified target is not logged in yet.");
- }
- else if (!IsPlayerSpawned(targetid))
- {
- return SendErrorMessage(playerid, "The specified target is not spawned.");
- }
- else
- {
- SetPlayerVirtualWorld(targetid, vw);
- SendInfoMessage(playerid, "You have set %s's virtual world to %i.", ReturnNameEx(targetid, 0), vw);
- }
- return 1;
- }
- CMD:setint(playerid, params[])
- {
- new targetid, interior;
- if (Players[playerid][pAdmin] < 2)
- {
- return SendErrorMessage(playerid, "You are not privileged to use this command.");
- }
- else if (sscanf(params, "ui", targetid, interior))
- {
- return SendSyntaxMessage(playerid, "/setint [playerid/name] [interior]");
- }
- else if (!IsPlayerConnected(targetid))
- {
- return SendErrorMessage(playerid, "The specified target doesn't exist.");
- }
- else if (IsPlayerNPC(targetid))
- {
- return SendErrorMessage(playerid, "You cannot use this command on a NPC.");
- }
- else if (!IsPlayerLoggedIn(targetid))
- {
- return SendErrorMessage(playerid, "The specified target is not logged in yet.");
- }
- else if (!IsPlayerSpawned(targetid))
- {
- return SendErrorMessage(playerid, "The specified target is not spawned.");
- }
- else
- {
- SetPlayerInterior(targetid, interior);
- SendInfoMessage(playerid, "You have set %s's interior to %i.", ReturnNameEx(targetid, 0), interior);
- }
- return 1;
- }
- CMD:gotocoords(playerid, params[])
- {
- new Float:fX, Float:fY, Float:fZ, interior;
- // remove commas so we can copy paste coords without removing commas.
- for (new i = 0, l = strlen(params); i < l; i ++) {
- if (params[i] == ',') {
- strdel(params, i, i + 1);
- }
- }
- if (Players[playerid][pAdmin] < 2)
- {
- return SendErrorMessage(playerid, "You are not privileged to use this command.");
- }
- else if (sscanf(params, "fffI(0)", fX, fY, fZ, interior))
- {
- return SendSyntaxMessage(playerid, "/gotocoords (x) (y) (z) [interior]");
- }
- else
- {
- SetPlayerPos(playerid, fX, fY, fZ);
- SetPlayerInterior(playerid, interior);
- SetCameraBehindPlayer(playerid);
- SendInfoMessage(playerid, "You have teleported to %.4f, %.4f, %.4f (interior: %i).", fX, fY, fZ, interior);
- }
- return 1;
- }
- CMD:vgoto(playerid, params[])
- {
- new vehicleid;
- if (Players[playerid][pAdmin] < 2)
- {
- return SendErrorMessage(playerid, "You are not privileged to use this command.");
- }
- else if (sscanf(params, "i", vehicleid))
- {
- return SendSyntaxMessage(playerid, "/vgoto (vehicle)");
- }
- else if (!IsValidVehicle(vehicleid))
- {
- return SendErrorMessage(playerid, "The specified vehicle doesn't exist.");
- }
- else
- {
- new
- Float:x,
- Float:y,
- Float:z;
- GetVehiclePos(vehicleid, x, y, z);
- SetPlayerPos(playerid, x, y, z + 2);
- SetPlayerInterior(playerid, 0);
- SetPlayerVirtualWorld(playerid, GetVehicleVirtualWorld(vehicleid));
- SendInfoMessage(playerid, "You have warped to vehicle %i.", vehicleid);
- }
- return 1;
- }
- CMD:vget(playerid, params[])
- {
- new vehicleid;
- if (Players[playerid][pAdmin] < 2)
- {
- return SendErrorMessage(playerid, "You are not privileged to use this command.");
- }
- else if (sscanf(params, "i", vehicleid))
- {
- return SendSyntaxMessage(playerid, "/vget (vehicle)");
- }
- else if (!IsValidVehicle(vehicleid))
- {
- return SendErrorMessage(playerid, "The specified vehicle doesn't exist.");
- }
- else
- {
- new
- Float:x,
- Float:y,
- Float:z;
- GetPlayerPos(playerid, x, y, z);
- SetVehiclePos(vehicleid, x, y, z);
- SetVehicleVirtualWorld(vehicleid, GetPlayerVirtualWorld(playerid));
- LinkVehicleToInterior(vehicleid, GetPlayerInterior(playerid));
- SendInfoMessage(playerid, "You have warped vehicle %i to your position.", vehicleid);
- }
- return 1;
- }
- CMD:sendto(playerid, params[])
- {
- new playerb;
- if(Players[playerid][pAdmin] < 2) return SendClientMessage(playerid, COLOR_GREY, "You are not authorized to use this command.");
- if(sscanf(params,"us[32]", playerb, params))
- {
- SendClientMessage(playerid, COLOR_WHITE, "[Usage]: /sendto [playerid] [place]");
- SendClientMessage(playerid, COLOR_GREY, "PLACES: ls | sf | lv");
- return 1;
- }
- if(!IsPlayerLoggedIn(playerb)) return SendClientMessage(playerid, COLOR_GREY, "Invalid player id.");
- if(!strcmp(params, "ls", true))
- {
- SetPlayerInterior(playerb, 0);
- SetPlayerVirtualWorld(playerb, 0);
- SetPlayerPos(playerb,1529.6,-1691.2,13.3);
- SendClientMessage(playerb, COLOR_WHITE, " You have been teleported to Los Santos.");
- }
- else if(!strcmp(params, "sf", true))
- {
- SetPlayerInterior(playerb, 0);
- SetPlayerVirtualWorld(playerb, 0);
- SetPlayerPos(playerb,-2015.261108, 154.379516, 27.687500);
- SendClientMessage(playerb, COLOR_WHITE, " You have been teleported to San Fierro.");
- }
- else if(!strcmp(params, "lv", true))
- {
- SetPlayerInterior(playerb, 0);
- SetPlayerVirtualWorld(playerb, 0);
- SetPlayerPos(playerid,1699.2,1435.1, 10.7);
- SendClientMessage(playerb, COLOR_WHITE, " You have been teleported to Las Venturas.");
- }
- return 1;
- }
|