Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- CMD:port(playerid, params[])
- {
- if (!GetAdminRank(playerid)) return SendClientMessageEx(playerid, COLOR_GRAD1, ERROR_ADMIN);
- new vID = GetPlayerVehicleID(playerid);
- new string[256], place[128];
- if (sscanf(params, "s[128]", place))
- {
- format(string, sizeof(string), "Verwende: /port [ORT]");
- SendClientMessageEx(playerid, COLOR_GRAD1, string);
- format(string, sizeof(string), "Verfügbar: banklv, banksf, bankls, sfpd, fbi, ls, sf, lv, airls, airsf, airlv");
- SendClientMessageEx(playerid, COLOR_GRAD1, string);
- format(string, sizeof(string), "palo, blue, dili, elqe, lasba, fort, bayside, angelpine, mount, angells");
- SendClientMessageEx(playerid, COLOR_GRAD1, string);
- return 1;
- }
- for (new j = 0; j < sizeof(DynPort); j ++)
- {
- if (strcmp(place, DynPort[j][pPortName], true) == 0)
- {
- if (IsPlayerInAnyVehicle(playerid))
- {
- for (new i = 0; i < MAX_PLAYERS; i ++)
- {
- if (IsLoggedIn(i))
- {
- if (GetPlayerVehicleID(i) == vID)
- {
- new Seat = GetPlayerVehicleSeat(i);
- SetPlayerInterior(playerid,0);
- SetPlayerVirtualWorld(playerid,0);
- SetVehiclePos(vID, DynPort[j][pPortX], DynPort[j][pPortY], DynPort[j][pPortZ]);
- PutPlayerInVehicleEx(i, vID, Seat);
- if (IsTrailerAttachedToVehicle(vID))
- {
- new trID = GetVehicleTrailer(vID);
- SetPlayerInterior(playerid,0);
- SetPlayerVirtualWorld(playerid,0);
- SetVehiclePos(trID, DynPort[j][pPortX] + 3.0, DynPort[j][pPortY], DynPort[j][pPortZ]);
- AttachTrailerToVehicle(trID, vID);
- }
- }
- }
- }
- }
- else
- {
- SetPlayerInterior(playerid, 0);
- SetPlayerVirtualWorld(playerid, 0);
- SetPlayerPos(playerid, DynPort[j][pPortX], DynPort[j][pPortY], DynPort[j][pPortZ]);
- }
- format(string, sizeof(string), "%s hat sich teleportiert: Port %s", GetFullName(playerid), DynPort[j][pPortName]);
- ABroadCast(COLOR_BLUE, string, 1);
- new uhrzeit[32], method[256], query[256];
- format(method, sizeof(method), "port %s", DynPort[j][pPortName]);
- format(uhrzeit, sizeof(uhrzeit), "%02d.%02d.%02d - %02d:%02d", tag, monat, jahr, stunde, minute);
- format(query, sizeof(query), "INSERT INTO `script_adminlog` (Admin, Method, Opfer, Uhrzeit) VALUES ('%s', '%s', '%s', '%s')", GetFullName(playerid), method, GetFullName(playerid), uhrzeit);
- mysql_function_query(myCon, query, false, "", "");
- return 1;
- }
- }
- format(string, sizeof(string), "Verwende: /port [ORT]");
- SendClientMessageEx(playerid, COLOR_GRAD1, string);
- format(string, sizeof(string), "Verfügbar: banklv, banksf, bankls, sfpd, fbi, ls, sf, lv, airls, airsf, airlv");
- SendClientMessageEx(playerid, COLOR_GRAD1, string);
- format(string, sizeof(string), "palo, blue, dili, elqe, lasba, fort, bayside, angelpine, mount, angells");
- SendClientMessageEx(playerid, COLOR_GRAD1, string);
- return 1;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement