Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- YCMD:goto(playerid, params[],help)
- {
- if(PlayerInfo[playerid][pRadi] == 1) return SCM(playerid,-1,"Vas Server | "CRVENA"Radis posao ne mozes da koristis ovu komandu!");
- new string[128], giveplayerid;
- if(PlayerInfo[playerid][pAdmin] >= 1 || PlayerInfo[playerid][pGM] >= 1 || PlayerInfo[playerid][pPromoter] >= 1 || PlayerInfo[playerid][pVip] >= 1)
- {
- if( !sscanf(params, "u", giveplayerid ) ) {
- if( giveplayerid == INVALID_PLAYER_ID ) return SCM(playerid, -1,""CRVENA"Igrac nije povezan!");
- SCM(playerid, -1,""SRWBOJA"[Vas Server]"BELA"Poslali ste zahtjev za teleport, pricekajte malo!");
- format( string, sizeof( string ), ""SRWBOJA"Igrac "BELA"%s vam je poslao zahtev za /goto !:", GetName( playerid ) );
- SPD( giveplayerid, 2115, DSB, "Zahtev za Goto", string, "Prihvati", "Odbij" );
- SetTimerEx("ZahtevZaGoto", 4200, false, "i", playerid);
- }
- else SCM(playerid, -1,""ZUTA"PORT Pomoc | "BELA"/goto [ID/Nick]");
- }
- else SCM(playerid, -1,""CRVENA"[PORT] "BELA"Samo Admini - GM i V.I.P!");
- return 1;
- }
- /////timer
- forward ZahtevZaGoto(playerid);
- public ZahtevZaGoto(playerid)
- {
- new Float:plx,Float:ply,Float:plz;
- new string[265], giveplayerid, giveplayer[MAX_PLAYER_NAME];
- if(PlayerInfo[giveplayerid][pPrihvatioZahtev] == 1)
- {
- GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer)); GetPlayerPos(giveplayerid, plx, ply, plz);
- if (GetPlayerState(playerid) == 2)
- {
- new tmpcar = GetPlayerVehicleID(playerid);
- SetVehiclePos(tmpcar, plx, ply+4, plz);
- }
- else
- {
- SetPlayerPos(playerid,plx,ply+2, plz);
- }
- SetPlayerInterior(playerid, GetPlayerInterior(giveplayerid));
- SetPlayerVirtualWorld(playerid, GetPlayerVirtualWorld(giveplayerid));
- format(string, sizeof(string),""ZUTA"[PORT] "BELA"Portao si se do igraca %s.",GetName(giveplayerid));
- SCM(playerid, -1, string);
- new arank[124];
- if(PlayerInfo[playerid][pAdmin] == 1) { arank = "Admin Level 1"; }
- else if(PlayerInfo[playerid][pAdmin] == 2) { arank = "Admin Level 2"; }
- else if(PlayerInfo[playerid][pAdmin] == 3) { arank = "Admin Level 3"; }
- else if(PlayerInfo[playerid][pAdmin] == 4) { arank = "Admin Level 4"; }
- else if(PlayerInfo[playerid][pAdmin] == 5) { arank = "Admin Level 5 (Head-Admin)"; }
- else if(PlayerInfo[playerid][pVlasnik] == 1) { arank = "Vlasnik"; }
- else if(PlayerInfo[playerid][pAdmin] == 6) { arank = "Vlasnik"; }
- else if(PlayerInfo[playerid][pGM] == 1) { arank = "GameMaster Level 1"; }
- else if(PlayerInfo[playerid][pGM] == 2) { arank = "GameMaster Level 2"; }
- else if(PlayerInfo[playerid][pGM] == 3) { arank = "GameMaster Level 3"; }
- else if(PlayerInfo[playerid][pImunitet] == 1) { arank = "Spec Team"; }
- else if(PlayerInfo[playerid][pVip] == 1) { arank = "Vip Level 1"; }
- else if(PlayerInfo[playerid][pVip] == 2) { arank = "Vip Level 2"; }
- else if(PlayerInfo[playerid][pVip] == 3) { arank = "Vip Level 3"; }
- else if(PlayerInfo[playerid][pVip] == 4) { arank = "Vip Level 4"; }
- else if(PlayerInfo[playerid][pVip] == 5) { arank = "Premium"; }
- format(string, sizeof(string),""ZUTA"[PORT] "BELA"%s %s se portao do vas.",arank, GetName( playerid ) );
- SCM(giveplayerid, -1, string);
- }
- return 1;
- }
- ///fdialog
- fDialog(2115)
- {
- if( response )
- {
- SCM(playerid, -1, ""SRWBOJA"[NK:RPG] "BELA"Prihvatili ste zahtjev za goto!");
- SetTimerEx("ZahtevZaGoto", 4200, false, "i", giveplayerid);
- PlayerInfo[playerid][pPrihvatioZahtev] = 1;
- }
- else
- {
- SCM(playerid, -1, ""SRWBOJA"[NK:RPG] "BELA"Odbili ste zahtev za goto!");
- PlayerInfo[playerid][pPrihvatioZahtev] = 0;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement