[Pomoc]Teleport

Započeo 99Mile99, Novembar 19, 2012, 17:13:14 POSLE PODNE

prethodna tema - sledeća tema

0 članova i 2 gostiju pregledaju ovu temu.

Skripta koju koristim:moja od 0
Detaljan opis problema:znaci kada pisem /gotodrift on porta samo mene a ne i auto..kako da napravim da porta i auto samnom
Dio skripte://
Neke slike/video za lakse dobivanje pomoci(neobavezno)://

Evo dodaj ovo if (GetPlayerState(playerid) == 2)
{
new tmpcar = GetPlayerVehicleID(playerid);
SetVehiclePos(tmpcar, 1457.3992,-1012.5910,26.8438);//ovde stavljaj tvoje kordinate! :D :P
TelePos[playerid][0] = 0.0;TelePos[playerid][1] = 0.0;
LinkVehicleToInterior(tmpcar, 0);
SetPlayerVirtualWorld(playerid, 0);
}

Umesto if (GetPlayerState(playerid) == 2)
{
SetVehicleToRespawn(GetPlayerVehicleID(playerid));
SafeRemovePlayerFromVehicle(playerid);
SafeSetPlayerPos(playerid, 1833.2244,-1125.5272,24.6721);//
}


Ovo sam uzeo iz Raven's ali verujem da ce ti pomoci! :D :P
Poslednja Izmena: Novembar 19, 2012, 17:23:14 POSLE PODNE od Simke94

if (GetPlayerState(playerid) == 2)
{
SetVehicleToRespawn(GetPlayerVehicleID(playerid));
SafeRemovePlayerFromVehicle(playerid);
SafeSetPlayerPos(playerid, 1833.2244,-1125.5272,24.6721);
}



ovog nemam u modu kazem da je od 0 :D


if(strcmp(cmd, "/gotodrift", true) == 0)
{
    if(IsPlayerConnected(playerid))
    {
if(WantedLevel[playerid] > 0)
            {
                 SendClientMessage(playerid, COLOR_GREY, "   Imate Wanted ne mozete se portovati !");
             return 1;
        }
        if(PlayerInfo[playerid][pJailed] >= 1) return SendClientMessage(playerid,COLOR_WHITE,"u zatvoru/Jailu si nemozes se teleportovati");
if(PlayerInfo[playerid][pAdmin] >= 1)
{

if (GetPlayerState(playerid) == 2)
{
new tmpcar = GetPlayerVehicleID(playerid);
SetVehiclePos(tmpcar, -304.8792,1522.4731,75.3594);
TelePos[playerid][0] = 0.0;TelePos[playerid][1] = 0.0;
}
else
{
SetPlayerPos(playerid, -304.8792,1522.4731,75.3594);
}
SendClientMessage(playerid, COLOR_GRAD1, "   Teleportovani ste !");
SetPlayerInterior(playerid,0);
PlayerInfo[playerid][pInt] = 0;
    SetPlayerVirtualWorld(playerid, 0);
        PlayerInfo[playerid][pVirWorld] = 0;

// GetPlayerName(playerid, sendername, sizeof(sendername));
// format(string, sizeof(string), "", playerid, sendername);
// ABroadCast(COLOR_YELLOW,string,1);
}
else
{
SendClientMessage(playerid, COLOR_GRAD1, "   Niste ovlasteni da koristite tu komandu !");
}
}
return 1;
}


Evo ti iz mog moda samo izmeni koordinate.

CMD:gotodrift(playerid, params[])
{
SetPlayerPos(playerid, -292.2598,1537.7155,75.5625);
SetPlayerFacingAngle(playerid, 270 ); // Istok
SCM(playerid, COLOR_WHITE, "{0A54F5}Portan si!");
return 1;
}

Evo brate probaj nesto ovako :P
                              if(GetPlayerState(playerid) == 2)
{
new tmpcar = GetPlayerVehicleID(playerid);
SetVehiclePos(tmpcar, -292.2598,1537.7155,75.5625);
TelePos[playerid][0] = 0.0;TelePos[playerid][1] = 0.0;
LinkVehicleToInterior(tmpcar, 0);
SetPlayerVirtualWorld(playerid, 0);
}
else
{
        SetPlayerPos(playerid, -292.2598,1537.7155,75.5625);
                                        SetPlayerFacingAngle(playerid, 270 ); // Istok
                                        SCM(playerid, COLOR_WHITE, "{0A54F5}Portan si!");
}
Poslednja Izmena: Novembar 19, 2012, 17:37:24 POSLE PODNE od Simke94


Gledaj tebi bi cela komanda trebala da izgleda ovako!
CMD:gotodrift(playerid,params[])
{
    if(IsPlayerConnected(playerid))
    {
new string[128],sendername[MAX_PLAYER_NAME];
GetPlayerName(playerid,sendername,sizeof(sendername));
if(PlayerInfo[playerid][Admin] >= 3)
{
if(GetPlayerState(playerid) == 2)
{
new tmpcar = GetPlayerVehicleID(playerid);
SetVehiclePos(tmpcar, -292.2598,1537.7155,75.5625);
PlayerInfo[playerid][pPos_x] = 1206.6395, PlayerInfo[playerid][pPos_y] = -940.6758, PlayerInfo[playerid][pPos_z] = 42.7410;
TelePos[playerid][0] = 0.0;TelePos[playerid][1] = 0.0;
LinkVehicleToInterior(tmpcar, 0);
SetPlayerVirtualWorld(playerid, 0);
OnPlayerExitFood(playerid);
new y, m, d;
new h,mi,s;
getdate(y,m,d);
gettime(h,mi,s);
format(string,sizeof(string), "(%d/%d/%d)[%d:%d:%d] %s je teleportovao do Drift Race",d,m,y,h,mi,s,sendername);
TelesLog(string);
}
else
{
SafeSetPlayerPos(playerid, -292.2598,1537.7155,75.5625);
SetPlayerVirtualWorld(playerid, 0);
}
format(string, sizeof(string), "[ADMIN]: %s se teleportovao do Drif Race.", sendername);
ABroadCast(COLOR_LIGHTRED,string, 5);
SafeSetPlayerInterior(playerid,0);
DisablePlayerCheckpoint(playerid);
new y, m, d;
new h,mi,s;
getdate(y,m,d);
gettime(h,mi,s);
format(string,sizeof(string), "(%d/%d/%d)[%d:%d:%d] %s se teleportovao do Drift Race",d,m,y,h,mi,s,sendername);
TelesLog(string);
}
else
{
SCM(playerid, COLOR_GRAD1, "** Niste ovlasceni da koristite ovu komandu!");
return 1;
}
}
return 1;
}


Ako opet nece onda ne znam kako da ti pomognem! xD :P

Citat: Simke94 poslato Novembar 19, 2012, 17:47:36 POSLE PODNE
Gledaj tebi bi cela komanda trebala da izgleda ovako!
CMD:gotodrift(playerid,params[])
{
    if(IsPlayerConnected(playerid))
    {
new string[128],sendername[MAX_PLAYER_NAME];
GetPlayerName(playerid,sendername,sizeof(sendername));
if(PlayerInfo[playerid][Admin] >= 3)
{
if(GetPlayerState(playerid) == 2)
{
new tmpcar = GetPlayerVehicleID(playerid);
SetVehiclePos(tmpcar, -292.2598,1537.7155,75.5625);
PlayerInfo[playerid][pPos_x] = 1206.6395, PlayerInfo[playerid][pPos_y] = -940.6758, PlayerInfo[playerid][pPos_z] = 42.7410;
TelePos[playerid][0] = 0.0;TelePos[playerid][1] = 0.0;
LinkVehicleToInterior(tmpcar, 0);
SetPlayerVirtualWorld(playerid, 0);
OnPlayerExitFood(playerid);
new y, m, d;
new h,mi,s;
getdate(y,m,d);
gettime(h,mi,s);
format(string,sizeof(string), "(%d/%d/%d)[%d:%d:%d] %s je teleportovao do Drift Race",d,m,y,h,mi,s,sendername);
TelesLog(string);
}
else
{
SafeSetPlayerPos(playerid, -292.2598,1537.7155,75.5625);
SetPlayerVirtualWorld(playerid, 0);
}
format(string, sizeof(string), "[ADMIN]: %s se teleportovao do Drif Race.", sendername);
ABroadCast(COLOR_LIGHTRED,string, 5);
SafeSetPlayerInterior(playerid,0);
DisablePlayerCheckpoint(playerid);
new y, m, d;
new h,mi,s;
getdate(y,m,d);
gettime(h,mi,s);
format(string,sizeof(string), "(%d/%d/%d)[%d:%d:%d] %s se teleportovao do Drift Race",d,m,y,h,mi,s,sendername);
TelesLog(string);
}
else
{
SCM(playerid, COLOR_GRAD1, "** Niste ovlasceni da koristite ovu komandu!");
return 1;
}
}
return 1;
}


Ako opet nece onda ne znam kako da ti pomognem! xD :P

Jao brt nisam ovde stavio tvoje koordinate! :/
PlayerInfo[playerid][pPos_x] = -292.2598, PlayerInfo[playerid][pPos_y] = 1537.7155, PlayerInfo[playerid][pPos_z] = 75.5625;

Nadam se da si primetio ovo i da si ispravio pre nego sto si compile! xD :P
Poslednja Izmena: Novembar 19, 2012, 17:54:17 POSLE PODNE od Simke94

C:\Users\Mile\Desktop\Runners DM\gamemodes\Runners.pwn(542) : error 017: undefined symbol "PlayerInfo"
C:\Users\Mile\Desktop\Runners DM\gamemodes\Runners.pwn(542) : warning 215: expression has no effect
C:\Users\Mile\Desktop\Runners DM\gamemodes\Runners.pwn(542) : error 001: expected token: ";", but found "]"
C:\Users\Mile\Desktop\Runners DM\gamemodes\Runners.pwn(542) : error 029: invalid expression, assumed zero
C:\Users\Mile\Desktop\Runners DM\gamemodes\Runners.pwn(542) : fatal error 107: too many error messages on one line

Compilation aborted.Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase


4 Errors.

Kako ti onda pravis komande za admine, lidere, gm bez playerinfo? :P Mozda ti je definisano drugacije! Kod mene je ovako new PlayerInfo[MAX_PLAYERS][pInfo];

C:\Users\Mile\Desktop\Runners DM\gamemodes\Runners.pwn(29) : error 017: undefined symbol "pInfo"
C:\Users\Mile\Desktop\Runners DM\gamemodes\Runners.pwn(29) : error 009: invalid array size (negative, zero or out of bounds)
C:\Users\Mile\Desktop\Runners DM\gamemodes\Runners.pwn(546) : error 017: undefined symbol "Admin"
C:\Users\Mile\Desktop\Runners DM\gamemodes\Runners.pwn(552) : error 017: undefined symbol "pPos_x"
C:\Users\Mile\Desktop\Runners DM\gamemodes\Runners.pwn(552) : warning 213: tag mismatch
C:\Users\Mile\Desktop\Runners DM\gamemodes\Runners.pwn(553) : error 017: undefined symbol "TelePos"
C:\Users\Mile\Desktop\Runners DM\gamemodes\Runners.pwn(553) : warning 215: expression has no effect
C:\Users\Mile\Desktop\Runners DM\gamemodes\Runners.pwn(553) : error 001: expected token: ";", but found "]"
C:\Users\Mile\Desktop\Runners DM\gamemodes\Runners.pwn(553) : error 029: invalid expression, assumed zero
C:\Users\Mile\Desktop\Runners DM\gamemodes\Runners.pwn(553) : fatal error 107: too many error messages on one line

Compilation aborted.Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase


8 Errors.


ma nemogu ce kopirat jer fali puno toga

Brate moras sve ovo da imas na pocetku skripte! :P Reci mi kako pravis proveru za admina,gm,lidera,housekey.....?

Salji dio skripte na PP da ti sredim




Balkan Ulice RPG opis servera: Click



-Tutorial za mijesanje ID-ova na vozilima: Click