Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- CMD:oport(playerid, params[])
- {
- if(PI[playerid][Admin] >= 1 || PI[playerid][ServerRank] == MAPPER || PI[playerid][ServerRank] == MAPPERVODJA || PI[playerid][GM] >= 1)
- {
- new odabir[20], id;
- if(sscanf(params, "s[20]i", odabir, id))
- {
- Usage(playerid, "/oport [ime] [ID]");
- SCM(playerid, BELA, "Dostupno: kuca, vikendica, hotel, stan, firma, garaza, grafit, trafika");
- SCM(playerid, BELA, "Dostupno: imanje, kapija, actor, org, radar, atm posao, kontejner, bilbord");
- return 1;
- }
- else {
- if(strcmp(odabir,"kuca",true) == 0) {
- if(!Kuce[id][kExist]) return Error(playerid, "Ta kuca(ID) ne postoji u bazi podataka!");
- Macak_SetPlayerPos(playerid, Kuce[id][UlazX], Kuce[id][UlazY], Kuce[id][UlazZ]);
- SetPlayerInterior(playerid, 0);
- SetPlayerVirtualWorld(playerid, 0);
- Info(playerid, "Teleportovali ste se do kuce ID: %s.", id);
- }
- if(strcmp(odabir,"vikendica",true) == 0) {
- if(!Vikendice[id][vExist]) return Error(playerid, "Ta vikendica(ID) ne postoji u bazi podataka!");
- Macak_SetPlayerPos(playerid, Vikendice[id][vUlazX], Vikendice[id][vUlazY], Vikendice[id][vUlazZ]);
- SetPlayerInterior(playerid, 0);
- SetPlayerVirtualWorld(playerid, 0);
- Info(playerid, "Teleportovali ste se do vikendice ID: %s.", id);
- }
- if(strcmp(odabir,"hotel",true) == 0) {
- //if(!Hoteli[id][hExist]) return Error(playerid, "Taj hotel(ID) ne postoji u bazi podataka!");
- Macak_SetPlayerPos(playerid, Hoteli[id][hUlazX], Hoteli[id][hUlazY], Hoteli[id][hUlazZ]);
- SetPlayerInterior(playerid, 0);
- SetPlayerVirtualWorld(playerid, 0);
- Info(playerid, "Teleportovali ste se do hotela ID %s.", id);
- }
- if(strcmp(odabir,"stan",true) == 0) {
- if(!Stanx[id][sExist]) return Error(playerid, "Taj stan(ID) ne postoji u bazi podataka!");
- Macak_SetPlayerPos(playerid, Stanx[id][sUlazX], Stanx[id][sUlazY], Stanx[id][sUlazZ]);
- SetPlayerInterior(playerid, 0);
- SetPlayerVirtualWorld(playerid, 0);
- Info(playerid, "Teleportovali ste se do stana ID: %s.", id);
- }
- if(strcmp(odabir,"firma",true) == 0) {
- if(!Firme[id][fExist]) return Error(playerid, "Ta firma(ID) ne postoji u bazi podataka!");
- Macak_SetPlayerPos(playerid, Firme[id][fUlazX], Firme[id][fUlazY], Firme[id][fUlazZ]);
- SetPlayerInterior(playerid, 0);
- SetPlayerVirtualWorld(playerid, 0);
- Info(playerid, "Teleportovali ste se do firme ID: %s.", id);
- }
- if(strcmp(odabir,"garaza",true) == 0) {
- if(!Garaze[id][gExist]) return Error(playerid, "Ta garaza(ID) ne postoji u bazi podataka!");
- Macak_SetPlayerPos(playerid, Garaze[id][gUlazX], Garaze[id][gUlazY], Garaze[id][gUlazZ]);
- SetPlayerInterior(playerid, 0);
- SetPlayerVirtualWorld(playerid, 0);
- Info(playerid, "Teleportovali ste se do garaze ID: %s.", id);
- }
- if(strcmp(odabir,"imanje",true) == 0) {
- if(!ImanjeInfo[id][iExist]) return Error(playerid, "To imanje(ID) ne postoji u bazi podataka!");
- Macak_SetPlayerPos(playerid, ImanjeInfo[id][iImanjeX], ImanjeInfo[id][iImanjeY], ImanjeInfo[id][iImanjeZ]);
- SetPlayerInterior(playerid, 0);
- SetPlayerVirtualWorld(playerid, 0);
- Info(playerid, "Teleportovali ste se do imanja ID: %s.", id);
- }
- if(strcmp(odabir,"kapija",true) == 0) {
- if(!KapijaInfo[id][kExist]) return Error(playerid, "Ta kapija(ID) ne postoji u bazi podataka!");
- Macak_SetPlayerPos(playerid, KapijaInfo[id][kapPoz][0], KapijaInfo[id][kapPoz][1], KapijaInfo[id][kapPoz][2]);
- SetPlayerInterior(playerid, 0);
- SetPlayerVirtualWorld(playerid, 0);
- Info(playerid, "Teleportovali ste se do kapije ID: %s.", id);
- }
- if(strcmp(odabir,"org",true) == 0) {
- if(!OrgInfo[id][oExist]) return Error(playerid, "Ta organizacija(ID) ne postoji u bazi podataka!");
- Macak_SetPlayerPos(playerid, OrgInfo[id][oPozExtX], OrgInfo[id][oPozExtY], OrgInfo[id][oPozExtZ]);
- SetPlayerInterior(playerid, 0);
- SetPlayerVirtualWorld(playerid, 0);
- Info(playerid, "Teleportovali ste se do organizacije ID: %s.", id);
- }
- if(strcmp(odabir,"radar",true) == 0) {
- if(!RadarInfo[id][R_Exist]) return Error(playerid, "Taj radar(ID) ne postoji u bazi podataka!");
- Macak_SetPlayerPos(playerid, RadarInfo[id][R_Pos][0], RadarInfo[id][R_Pos][1], RadarInfo[id][R_Pos][2]);
- SetPlayerInterior(playerid, 0);
- SetPlayerVirtualWorld(playerid, 0);
- Info(playerid, "Teleportovali ste se do radara ID: %s.", id);
- }
- if(strcmp(odabir,"atm",true) == 0) {
- if(!AtmInfo[id][aExist]) return Error(playerid, "Taj atm(ID) ne postoji u bazi podataka!");
- Macak_SetPlayerPos(playerid, AtmInfo[id][aAtmX], AtmInfo[id][aAtmY], AtmInfo[id][aAtmZ]);
- SetPlayerInterior(playerid, 0);
- SetPlayerVirtualWorld(playerid, 0);
- Info(playerid, "Teleportovali ste se do bankomata ID: %s.", id);
- }
- if(strcmp(odabir,"grafit",true) == 0) {
- if(!GrafitInfo[id][gExist]) return Error(playerid, "Taj grafit(ID) ne postoji u bazi podataka!");
- Macak_SetPlayerPos(playerid, GrafitInfo[id][gGraffitX], GrafitInfo[id][gGraffitY], GrafitInfo[id][gGraffitZ]);
- SetPlayerInterior(playerid, 0);
- SetPlayerVirtualWorld(playerid, 0);
- Info(playerid, "Teleportovali ste se do grafita ID: %s.", id);
- }
- if(strcmp(odabir,"trafika",true) == 0) {
- if(!TrafikaInfo[id][tExist]) return Error(playerid, "Ta trafika(ID) ne postoji u bazi podataka!");
- Macak_SetPlayerPos(playerid, TrafikaInfo[id][trX2], TrafikaInfo[id][trY2], TrafikaInfo[id][trZ2]);
- SetPlayerInterior(playerid, 0);
- SetPlayerVirtualWorld(playerid, 0);
- Info(playerid, "Teleportovali ste se do trafike ID: %s.", id);
- }
- if(strcmp(odabir,"bilbord",true) == 0) {
- if(!Bilbordi[id][bExist]) return Error(playerid, "Ta trafika(ID) ne postoji u bazi podataka!");
- Macak_SetPlayerPos(playerid, Bilbordi[id][bilUlazX], Bilbordi[id][bilUlazY], Bilbordi[id][bilUlazZ]);
- SetPlayerInterior(playerid, 0);
- SetPlayerVirtualWorld(playerid, 0);
- Info(playerid, "Teleportovali ste se do bilborda ID: %s.", id);
- }
- if(strcmp(odabir,"actor",true) == 0) {
- if(!ActorInfo[id][aExist]) return Error(playerid, "Ta trafika(ID) ne postoji u bazi podataka!");
- Macak_SetPlayerPos(playerid, ActorInfo[id][aPozX], ActorInfo[id][aPozY], ActorInfo[id][aPozZ]);
- SetPlayerInterior(playerid, 0);
- SetPlayerVirtualWorld(playerid, 0);
- Info(playerid, "Teleportovali ste se do actora ID: %s.", id);
- }
- if(strcmp(odabir,"posao",true) == 0) {
- if(id < 1 || id > MAX_JOBS) return Error(playerid, "Taj posao(ID) ne postoji u bazi podataka(1-18)!");
- id--;
- Macak_SetPlayerPos(playerid, jobsInfos[id][jPos][0], jobsInfos[id][jPos][1], jobsInfos[id][jPos][2]);
- SetPlayerInterior(playerid, 0);
- SetPlayerVirtualWorld(playerid, 0);
- Info(playerid, "Teleportovali ste se do posla %s.", jobsInfos[id][jName]);
- }
- if(strcmp(odabir,"kontejner",true) == 0) {
- if(!KontInfo[id][koExist]) return Error(playerid, "Taj kontejner (ID) ne postoji u bazi podataka!");
- Macak_SetPlayerPos(playerid, KontInfo[id][koObjPos][0]+2, KontInfo[id][koObjPos][1], KontInfo[id][koObjPos][2]);
- SetPlayerInterior(playerid, 0);
- SetPlayerVirtualWorld(playerid, 0);
- Info(playerid, "Teleportovali ste se do kontejnera ID %d", id);
- }
- }
- }
- else return Error(playerid, "Niste u mogucnosti koristiti ovu komandu.");
- return 1;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement