Jump to content
  • 0

[PROBLEMA] ~ GorkemRO


GorkemRO

Question

Salut sa-mp.ro ! Am si eu o problema .. Am incercat sa editez comanda /goto .. si nu prea mi-a mers ..

Am vrut sa fac asa " Ai fost teleportat la playerul %s " .

Uitati comanda .  [pawn]if(strcmp(cmd, "/goto", true) == 0)

{

    if(IsPlayerConnected(playerid))

    {

tmp = strtok(cmdtext, idx);

if(!strlen(tmp))

{

SendClientMessage(playerid, COLOR_GRAD2, "CMD: /goto [playerid/PartOfName]");

return 1;

}

new Float:plocx,Float:plocy,Float:plocz;

new plo;

plo = ReturnUser(tmp);

if (IsPlayerConnected(plo))

{

    if(plo != INVALID_PLAYER_ID)

    {

        if (PlayerInfo[playerid][pAdmin] >= 1 || PlayerInfo[playerid][pHelper] >= 1)

{

if(Spectate[playerid] != 255)

{

Spectate[playerid] = 256;

}

GetPlayerPos(plo, plocx, plocy, plocz);

if(PlayerInfo[plo][pInt] > 0 || GetPlayerInterior(plo) > 0)

{

    SetPlayerInterior(playerid,GetPlayerInterior(plo));

SetPlayerInterior(playerid,PlayerInfo[plo][pInt]);

PlayerInfo[playerid][pInt] = PlayerInfo[plo][pInt];

PlayerInfo[playerid][pLocal] = PlayerInfo[plo][pLocal];

}

if(PlayerInfo[playerid][pInt] == 0)

{

SetPlayerInterior(playerid,0);

}

if(plocz > 530.0 && PlayerInfo[plo][pInt] == 0) //the highest land point in sa = 526.8

{

SetPlayerInterior(playerid,1);

PlayerInfo[playerid][pInt] = 1;

}

if (GetPlayerState(playerid) == 2)

{

new tmpcar = GetPlayerVehicleID(playerid);

SetVehiclePos(tmpcar, plocx, plocy+4, plocz);

TelePos[playerid][0] = 0.0;TelePos[playerid][1] = 0.0;

}

else

{

SetPlayerPos(playerid,plocx,plocy+2, plocz);

}

format(string, sizeof(string), " Ai fost teleportat la playerul %s.", giveplayer);

                SendClientMessage(playerid, 0xA8A8FFFF, string);

                                                SetPlayerInterior(playerid,GetPlayerInterior(plo));

                                                GetPlayerName(playa, giveplayer, sizeof(giveplayer));

PlayerInfo[playerid][pInt] = GetPlayerInterior(plo);

SetPlayerVirtualWorld(playerid,GetPlayerVirtualWorld(plo));

HouseEntered[playerid] = HouseEntered[plo];

}

else

{

SendClientMessage(playerid, COLOR_1RED, "Nu ai acces la aceasta comanda ");

}

}

}

else

{

format(string, sizeof(string), " That player is not connected.", plo);

SendClientMessage(playerid, COLOR_GRAD1, string);

}

}

return 1;

}[/pawn]

Cu toti stiti ca trebuie sa dau /goto [nume/id] ! Si din pacate cand dau /goto ma da la Burger Shot si imi arata " Ai fost teleportat la OS! " niste bazaconii

Link to comment
Share on other sites

11 answers to this question

Recommended Posts

new giveplayer[MAX_PLAYER_NAME];

GetPlayerName(plo, giveplayer, sizeof(giveplayer));

format(string, sizeof(string), " Ai fost teleportat la playerul %s.", giveplayer);

SendClientMessage(playerid, 0xA8A8FFFF, string);

 

1859311972_BANNER-GIREADAcopy-min.thumb.png.48e5e420ae2185dce5b244965a1d2601.png

 

Link to comment
Share on other sites

C:\Users\x\Desktop\GorkemRO\gamemodes\Godfather.pwn(3880) : warning 219: local variable "giveplayer" shadows a variable at a preceding level
C:\Users\x\Desktop\GorkemRO\gamemodes\Godfather.pwn(22392) : warning 219: local variable "giveplayer" shadows a variable at a preceding level
C:\Users\x\Desktop\GorkemRO\gamemodes\Godfather.pwn(25489) : warning 219: local variable "playa" shadows a variable at a preceding level
C:\Users\x\Desktop\GorkemRO\gamemodes\Godfather.pwn(26240) : warning 219: local variable "playa" shadows a variable at a preceding level
C:\Users\x\Desktop\GorkemRO\gamemodes\Godfather.pwn(28050) : warning 219: local variable "playa" shadows a variable at a preceding level
C:\Users\x\Desktop\GorkemRO\gamemodes\Godfather.pwn(28959) : warning 219: local variable "playa" shadows a variable at a preceding level
C:\Users\x\Desktop\GorkemRO\gamemodes\Godfather.pwn(31270) : warning 219: local variable "playa" shadows a variable at a preceding level
C:\Users\x\Desktop\GorkemRO\gamemodes\Godfather.pwn(33597) : warning 219: local variable "playa" shadows a variable at a preceding level
C:\Users\x\Desktop\GorkemRO\gamemodes\Godfather.pwn(33641) : warning 219: local variable "playa" shadows a variable at a preceding level
C:\Users\x\Desktop\GorkemRO\gamemodes\Godfather.pwn(35518) : warning 219: local variable "playa" shadows a variable at a preceding level
C:\Users\x\Desktop\GorkemRO\gamemodes\Godfather.pwn(38054) : warning 219: local variable "playa" shadows a variable at a preceding level
C:\Users\x\Desktop\GorkemRO\gamemodes\Godfather.pwn(38277) : warning 219: local variable "playa" shadows a variable at a preceding level
C:\Users\x\Desktop\GorkemRO\gamemodes\Godfather.pwn(39265) : warning 219: local variable "playa" shadows a variable at a preceding level
C:\Users\x\Desktop\GorkemRO\gamemodes\Godfather.pwn(39533) : warning 219: local variable "playa" shadows a variable at a preceding level
C:\Users\x\Desktop\GorkemRO\gamemodes\Godfather.pwn(39832) : warning 219: local variable "playa" shadows a variable at a preceding level
C:\Users\x\Desktop\GorkemRO\gamemodes\Godfather.pwn(39869) : warning 219: local variable "playa" shadows a variable at a preceding level
C:\Users\x\Desktop\GorkemRO\gamemodes\Godfather.pwn(40129) : warning 219: local variable "playa" shadows a variable at a preceding level
C:\Users\x\Desktop\GorkemRO\gamemodes\Godfather.pwn(40190) : warning 219: local variable "playa" shadows a variable at a preceding level
C:\Users\x\Desktop\GorkemRO\gamemodes\Godfather.pwn(40238) : warning 219: local variable "playa" shadows a variable at a preceding level
C:\Users\x\Desktop\GorkemRO\gamemodes\Godfather.pwn(41433) : warning 219: local variable "playa" shadows a variable at a preceding level
C:\Users\x\Desktop\GorkemRO\gamemodes\Godfather.pwn(41472) : warning 219: local variable "playa" shadows a variable at a preceding level
C:\Users\x\Desktop\GorkemRO\gamemodes\Godfather.pwn(43155) : warning 219: local variable "playa" shadows a variable at a preceding level
C:\Users\x\Desktop\GorkemRO\gamemodes\Godfather.pwn(43367) : warning 219: local variable "playa" shadows a variable at a preceding level
C:\Users\x\Desktop\GorkemRO\gamemodes\Godfather.pwn(43942) : warning 219: local variable "playa" shadows a variable at a preceding level
C:\Users\x\Desktop\GorkemRO\gamemodes\Godfather.pwn(43978) : warning 219: local variable "playa" shadows a variable at a preceding level
C:\Users\x\Desktop\GorkemRO\gamemodes\Godfather.pwn(44560) : warning 219: local variable "playa" shadows a variable at a preceding level
C:\Users\x\Desktop\GorkemRO\gamemodes\Godfather.pwn(44675) : warning 219: local variable "playa" shadows a variable at a preceding level
C:\Users\x\Desktop\GorkemRO\gamemodes\Godfather.pwn(44734) : warning 219: local variable "playa" shadows a variable at a preceding level
C:\Users\x\Desktop\GorkemRO\gamemodes\Godfather.pwn(51523) : warning 219: local variable "playa" shadows a variable at a preceding level
C:\Users\x\Desktop\GorkemRO\gamemodes\Godfather.pwn(51585) : warning 219: local variable "playa" shadows a variable at a preceding level
C:\Users\x\Desktop\GorkemRO\gamemodes\Godfather.pwn(51625) : warning 219: local variable "playa" shadows a variable at a preceding level
C:\Users\x\Desktop\GorkemRO\gamemodes\Godfather.pwn(51665) : warning 219: local variable "playa" shadows a variable at a preceding level
C:\Users\x\Desktop\GorkemRO\gamemodes\Godfather.pwn(53009) : warning 219: local variable "playa" shadows a variable at a preceding level
C:\Users\x\Desktop\GorkemRO\gamemodes\Godfather.pwn(53065) : warning 219: local variable "playa" shadows a variable at a preceding level
C:\Users\x\Desktop\GorkemRO\gamemodes\Godfather.pwn(53663) : warning 219: local variable "playa" shadows a variable at a preceding level
C:\Users\x\Desktop\GorkemRO\gamemodes\Godfather.pwn(53726) : warning 219: local variable "playa" shadows a variable at a preceding level
C:\Users\x\Desktop\GorkemRO\gamemodes\Godfather.pwn(53789) : warning 219: local variable "playa" shadows a variable at a preceding level
C:\Users\x\Desktop\GorkemRO\gamemodes\Godfather.pwn(54036) : warning 219: local variable "playa" shadows a variable at a preceding level
C:\Users\x\Desktop\GorkemRO\gamemodes\Godfather.pwn(55753) : warning 219: local variable "giveplayer" shadows a variable at a preceding level
C:\Users\x\Desktop\GorkemRO\gamemodes\Godfather.pwn(59507) : warning 203: symbol is never used: "giveplayer"
Pawn compiler 3.2.3664	 	 	Copyright (c) 1997-2006, ITB CompuPhase

Header size:          11184 bytes
Code size:          2292172 bytes
Data size:          6889824 bytes
Stack/heap size:      16384 bytes; estimated max. usage: unknown, due to recursion
Total requirements: 9209564 bytes

40 Warnings.

Nu am uitat nici o {sau }

[pawn]if(strcmp(cmd, "/goto", true) == 0)

{

    if(IsPlayerConnected(playerid))

    {

tmp = strtok(cmdtext, idx);

if(!strlen(tmp))

{

SendClientMessage(playerid, COLOR_GRAD2, "CMD: /goto [playerid/PartOfName]");

return 1;

}

new Float:plocx,Float:plocy,Float:plocz;

new plo;

plo = ReturnUser(tmp);

if (IsPlayerConnected(plo))

{

    if(plo != INVALID_PLAYER_ID)

    {

        if (PlayerInfo[playerid][pAdmin] >= 1 || PlayerInfo[playerid][pHelper] >= 1)

{

if(Spectate[playerid] != 255)

{

Spectate[playerid] = 256;

}

GetPlayerPos(plo, plocx, plocy, plocz);

if(PlayerInfo[plo][pInt] > 0 || GetPlayerInterior(plo) > 0)

{

    SetPlayerInterior(playerid,GetPlayerInterior(plo));

SetPlayerInterior(playerid,PlayerInfo[plo][pInt]);

PlayerInfo[playerid][pInt] = PlayerInfo[plo][pInt];

PlayerInfo[playerid][pLocal] = PlayerInfo[plo][pLocal];

}

if(PlayerInfo[playerid][pInt] == 0)

{

SetPlayerInterior(playerid,0);

}

if(plocz > 530.0 && PlayerInfo[plo][pInt] == 0) //the highest land point in sa = 526.8

{

SetPlayerInterior(playerid,1);

PlayerInfo[playerid][pInt] = 1;

}

if (GetPlayerState(playerid) == 2)

{

new tmpcar = GetPlayerVehicleID(playerid);

SetVehiclePos(tmpcar, plocx, plocy+4, plocz);

TelePos[playerid][0] = 0.0;TelePos[playerid][1] = 0.0;

}

else

{

SetPlayerPos(playerid,plocx,plocy+2, plocz);

}

GetPlayerName(plo, giveplayer, sizeof(giveplayer));

            format(string, sizeof(string), " Ai fost teleportat la playerul %s.", giveplayer);

                SendClientMessage(playerid, 0xA8A8FFFF, string);

                                                SetPlayerInterior(playerid,GetPlayerInterior(plo));

                                                GetPlayerName(playa, giveplayer, sizeof(giveplayer));

PlayerInfo[playerid][pInt] = GetPlayerInterior(plo);

SetPlayerVirtualWorld(playerid,GetPlayerVirtualWorld(plo));

HouseEntered[playerid] = HouseEntered[plo];

}

else

{

SendClientMessage(playerid, COLOR_1RED, "Nu ai acces la aceasta comanda ");

}

}

}

else

{

format(string, sizeof(string), " That player is not connected.", plo);

SendClientMessage(playerid, COLOR_GRAD1, string);

}

}

return 1;

}[/pawn]

Link to comment
Share on other sites

[pawn] if(strcmp(cmd, "/goto", true) == 0)

{

    if(IsPlayerConnected(playerid))

    {

tmp = strtok(cmdtext, idx);

if(!strlen(tmp))

{

SendClientMessage(playerid, COLOR_GRAD2, "{B580FE}Foloseste:{FFFFFF} /goto [playerid/PartOfName]");

return 1;

}

new Float:plocx,Float:plocy,Float:plocz;

new plo;

plo = ReturnUser(tmp);

new playa;

  playa = ReturnUser(tmp);

if (IsPlayerConnected(plo))

{

    if(plo != INVALID_PLAYER_ID)

    {

if (PlayerInfo[playerid][pAdmin] >= 1 || PlayerInfo[playerid][pHelper] >= 1)

{

if(Spectate[playerid] != 255)

{

Spectate[playerid] = 256;

}

GetPlayerPos(plo, plocx, plocy, plocz);

if(PlayerInfo[plo][pInt] > 0)

{

SetPlayerInterior(playerid,PlayerInfo[plo][pInt]);

PlayerInfo[playerid][pInt] = PlayerInfo[plo][pInt];

PlayerInfo[playerid][pLocal] = PlayerInfo[plo][pLocal];

}

if(PlayerInfo[plo][pInt] == 10 && PlayerInfo[plo][pLocal] == 500)

            {

                          SendClientMessage(playerid, COLOR_GRAD2, "You can`t go to this player");

          return 1;

            }

if(PlayerInfo[playerid][pInt] == 0)

{

SetPlayerInterior(playerid,0);

}

if(plocz > 530.0 && PlayerInfo[plo][pInt] == 0) //the highest land point in sa = 526.8

{

SetPlayerInterior(playerid,1);

PlayerInfo[playerid][pInt] = 1;

}

if (GetPlayerState(playerid) == 2)

{

new tmpcar = GetPlayerVehicleID(playerid);

SetVehiclePos(tmpcar, plocx, plocy+4, plocz);

TelePos[playerid][0] = 0.0;TelePos[playerid][1] = 0.0;

}

else

{

SetPlayerPos(playerid,plocx,plocy+2, plocz);

}

format(string, sizeof(string), " Ai fost teleportat la %s",giveplayer);

                        SendClientMessage(plo, COLOR_GREY, string);

if (PlayerInfo[playerid][pAdmin] >= 1)

{

GetPlayerName(playa, giveplayer, sizeof(giveplayer));

                            GetPlayerName(playerid, sendername, sizeof(sendername));

    format(string, sizeof(string), " Admin {F81414}%s {AFAFAF}has teleported at you!",sendername);

            SendClientMessage(plo, COLOR_GREY, string);

format(string,sizeof(string), "INFO: %s has teleported to %s",sendername, giveplayer);

ABroadCast(COLOR_LIGHTRED,string, 5);

        }

        if (PlayerInfo[playerid][pHelper] >= 1)

{

GetPlayerName(playa, giveplayer, sizeof(giveplayer));

                            GetPlayerName(playerid, sendername, sizeof(sendername));

format(string,sizeof(string), "INFO: %s has teleported to %s",sendername, giveplayer);

ABroadCast(COLOR_LIGHTRED,string, 5);

    format(string, sizeof(string), " Helper {F81414}%s {AFAFAF}has teleported at you!",sendername);

            SendClientMessage(plo, COLOR_GREY, string);

        }

SetPlayerVirtualWorld(playerid,GetPlayerVirtualWorld(plo));

HouseEntered[playerid] = HouseEntered[plo];

}

else

{

SendClientMessage(playerid, COLOR_GRAD1, "  Nu ai rangul administrativ necesar!");

}

}

}

else

{

format(string, sizeof(string), "  %d is not an active player.", plo);

SendClientMessage(playerid, COLOR_GRAD1, string);

}

}

return 1;

}[/pawn]

Eu ti-am facut doar mesajul de teleportare. rrestul mesajelor le editezi tu ca sunt deja.

Link to comment
Share on other sites

[pawn] if(strcmp(cmd, "/goto", true) == 0)

{

    if(IsPlayerConnected(playerid))

    {

tmp = strtok(cmdtext, idx);

if(!strlen(tmp))

{

SendClientMessage(playerid, COLOR_GRAD2, "{B580FE}Foloseste:{FFFFFF} /goto [playerid/PartOfName]");

return 1;

}

new Float:plocx,Float:plocy,Float:plocz;

new plo;

plo = ReturnUser(tmp);

new playa;

  playa = ReturnUser(tmp);

if (IsPlayerConnected(plo))

{

    if(plo != INVALID_PLAYER_ID)

    {

if (PlayerInfo[playerid][pAdmin] >= 1 || PlayerInfo[playerid][pHelper] >= 1)

{

if(Spectate[playerid] != 255)

{

Spectate[playerid] = 256;

}

GetPlayerPos(plo, plocx, plocy, plocz);

if(PlayerInfo[plo][pInt] > 0)

{

SetPlayerInterior(playerid,PlayerInfo[plo][pInt]);

PlayerInfo[playerid][pInt] = PlayerInfo[plo][pInt];

PlayerInfo[playerid][pLocal] = PlayerInfo[plo][pLocal];

}

if(PlayerInfo[plo][pInt] == 10 && PlayerInfo[plo][pLocal] == 500)

            {

                          SendClientMessage(playerid, COLOR_GRAD2, "You can`t go to this player");

          return 1;

            }

if(PlayerInfo[playerid][pInt] == 0)

{

SetPlayerInterior(playerid,0);

}

if(plocz > 530.0 && PlayerInfo[plo][pInt] == 0) //the highest land point in sa = 526.8

{

SetPlayerInterior(playerid,1);

PlayerInfo[playerid][pInt] = 1;

}

if (GetPlayerState(playerid) == 2)

{

new tmpcar = GetPlayerVehicleID(playerid);

SetVehiclePos(tmpcar, plocx, plocy+4, plocz);

TelePos[playerid][0] = 0.0;TelePos[playerid][1] = 0.0;

}

else

{

SetPlayerPos(playerid,plocx,plocy+2, plocz);

}

format(string, sizeof(string), " Ai fost teleportat la %s",giveplayer);

                        SendClientMessage(plo, COLOR_GREY, string);

if (PlayerInfo[playerid][pAdmin] >= 1)

{

GetPlayerName(playa, giveplayer, sizeof(giveplayer));

                            GetPlayerName(playerid, sendername, sizeof(sendername));

    format(string, sizeof(string), " Admin {F81414}%s {AFAFAF}has teleported at you!",sendername);

            SendClientMessage(plo, COLOR_GREY, string);

format(string,sizeof(string), "INFO: %s has teleported to %s",sendername, giveplayer);

ABroadCast(COLOR_LIGHTRED,string, 5);

        }

        if (PlayerInfo[playerid][pHelper] >= 1)

{

GetPlayerName(playa, giveplayer, sizeof(giveplayer));

                            GetPlayerName(playerid, sendername, sizeof(sendername));

format(string,sizeof(string), "INFO: %s has teleported to %s",sendername, giveplayer);

ABroadCast(COLOR_LIGHTRED,string, 5);

    format(string, sizeof(string), " Helper {F81414}%s {AFAFAF}has teleported at you!",sendername);

            SendClientMessage(plo, COLOR_GREY, string);

        }

SetPlayerVirtualWorld(playerid,GetPlayerVirtualWorld(plo));

HouseEntered[playerid] = HouseEntered[plo];

}

else

{

SendClientMessage(playerid, COLOR_GRAD1, "  Nu ai rangul administrativ necesar!");

}

}

}

else

{

format(string, sizeof(string), "  %d is not an active player.", plo);

SendClientMessage(playerid, COLOR_GRAD1, string);

}

}

return 1;

}[/pawn]

Eu ti-am facut doar mesajul de teleportare. rrestul mesajelor le editezi tu ca sunt deja.

Imi scrie " Ai fost teleportat la " si atat. Nu scrie si la cine am fost teleportat . dar playerului ii apare care admin s-a teleportat la el.

Link to comment
Share on other sites

Incearca asa

[pawn]if(strcmp(cmd, "/goto", true) == 0)

{

    if(IsPlayerConnected(playerid))

    {

tmp = strtok(cmdtext, idx);

if(!strlen(tmp))

{

SendClientMessage(playerid, COLOR_GRAD2, "GOTO: Se foloseste asa /goto [playerid/PartOfName]");

return 1;

}

new Float:plocx,Float:plocy,Float:plocz;

new plo;

plo = ReturnUser(tmp);

if (IsPlayerConnected(plo))

{

    if(plo != INVALID_PLAYER_ID)

    {

        if (PlayerInfo[playerid][pAdmin] >= 1 || PlayerInfo[playerid][pHelper] >= 1)

{

if(Spectate[playerid] != 255)

{

Spectate[playerid] = 256;

}

GetPlayerPos(plo, plocx, plocy, plocz);

if(PlayerInfo[plo][pInt] > 0 || GetPlayerInterior(plo) > 0)

{

    SetPlayerInterior(playerid,GetPlayerInterior(plo));

SetPlayerInterior(playerid,PlayerInfo[plo][pInt]);

PlayerInfo[playerid][pInt] = PlayerInfo[plo][pInt];

PlayerInfo[playerid][pLocal] = PlayerInfo[plo][pLocal];

}

if(PlayerInfo[playerid][pInt] == 0)

{

SetPlayerInterior(playerid,0);

}

if(plocz > 530.0 && PlayerInfo[plo][pInt] == 0) //the highest land point in sa = 526.8

{

SetPlayerInterior(playerid,1);

PlayerInfo[playerid][pInt] = 1;

}

if (GetPlayerState(playerid) == 2)

{

new tmpcar = GetPlayerVehicleID(playerid);

SetVehiclePos(tmpcar, plocx, plocy+4, plocz);

TelePos[playerid][0] = 0.0;TelePos[playerid][1] = 0.0;

}

else

{

SetPlayerPos(playerid,plocx,plocy+2, plocz);

}

SendClientMessage(playerid, 0xA8A8FFFF, "  You have been teleported !");

                        SetPlayerInterior(playerid,GetPlayerInterior(plo));

PlayerInfo[playerid][pInt] = GetPlayerInterior(plo);

SetPlayerVirtualWorld(playerid,GetPlayerVirtualWorld(plo));

HouseEntered[playerid] = HouseEntered[plo];

}

else

{

SendClientMessage(playerid, COLOR_GREY, "Nu esti autorizat sa folosesti aceasta comanda!. ");

}

}

}

else

{

format(string, sizeof(string), " That player is not connected.", plo);

SendClientMessage(playerid, COLOR_GRAD1, string);

}

}

return 1;

}[/pawn]

Scripting for $$ .

CONTACT: [email protected] .

Link to comment
Share on other sites

Incearca asa

[pawn]if(strcmp(cmd, "/goto", true) == 0)

{

    if(IsPlayerConnected(playerid))

    {

tmp = strtok(cmdtext, idx);

if(!strlen(tmp))

{

SendClientMessage(playerid, COLOR_GRAD2, "GOTO: Se foloseste asa /goto [playerid/PartOfName]");

return 1;

}

new Float:plocx,Float:plocy,Float:plocz;

new plo;

plo = ReturnUser(tmp);

if (IsPlayerConnected(plo))

{

    if(plo != INVALID_PLAYER_ID)

    {

        if (PlayerInfo[playerid][pAdmin] >= 1 || PlayerInfo[playerid][pHelper] >= 1)

{

if(Spectate[playerid] != 255)

{

Spectate[playerid] = 256;

}

GetPlayerPos(plo, plocx, plocy, plocz);

if(PlayerInfo[plo][pInt] > 0 || GetPlayerInterior(plo) > 0)

{

    SetPlayerInterior(playerid,GetPlayerInterior(plo));

SetPlayerInterior(playerid,PlayerInfo[plo][pInt]);

PlayerInfo[playerid][pInt] = PlayerInfo[plo][pInt];

PlayerInfo[playerid][pLocal] = PlayerInfo[plo][pLocal];

}

if(PlayerInfo[playerid][pInt] == 0)

{

SetPlayerInterior(playerid,0);

}

if(plocz > 530.0 && PlayerInfo[plo][pInt] == 0) //the highest land point in sa = 526.8

{

SetPlayerInterior(playerid,1);

PlayerInfo[playerid][pInt] = 1;

}

if (GetPlayerState(playerid) == 2)

{

new tmpcar = GetPlayerVehicleID(playerid);

SetVehiclePos(tmpcar, plocx, plocy+4, plocz);

TelePos[playerid][0] = 0.0;TelePos[playerid][1] = 0.0;

}

else

{

SetPlayerPos(playerid,plocx,plocy+2, plocz);

}

SendClientMessage(playerid, 0xA8A8FFFF, "  You have been teleported !");

                        SetPlayerInterior(playerid,GetPlayerInterior(plo));

PlayerInfo[playerid][pInt] = GetPlayerInterior(plo);

SetPlayerVirtualWorld(playerid,GetPlayerVirtualWorld(plo));

HouseEntered[playerid] = HouseEntered[plo];

}

else

{

SendClientMessage(playerid, COLOR_GREY, "Nu esti autorizat sa folosesti aceasta comanda!. ");

}

}

}

else

{

format(string, sizeof(string), " That player is not connected.", plo);

SendClientMessage(playerid, COLOR_GRAD1, string);

}

}

return 1;

}[/pawn]

Nici nu ai citit toata problema + copy-paste din gM.

Link to comment
Share on other sites

Data trecuta nu am testat comanda, uite acum am testat si merge , am mai adaugat ceva

[pawn] if(strcmp(cmd, "/goto", true) == 0)

{

    if(IsPlayerConnected(playerid))

    {

tmp = strtok(cmdtext, idx);

if(!strlen(tmp))

{

SendClientMessage(playerid, COLOR_GRAD2, "{B580FE}Foloseste:{FFFFFF} /goto [playerid/PartOfName]");

return 1;

}

new Float:plocx,Float:plocy,Float:plocz;

new plo;

plo = ReturnUser(tmp);

new playa;

  playa = ReturnUser(tmp);

if (IsPlayerConnected(plo))

{

    if(plo != INVALID_PLAYER_ID)

    {

if (PlayerInfo[playerid][pAdmin] >= 1 || PlayerInfo[playerid][pHelper] >= 1)

{

if(Spectate[playerid] != 255)

{

Spectate[playerid] = 256;

}

GetPlayerPos(plo, plocx, plocy, plocz);

if(PlayerInfo[plo][pInt] > 0)

{

SetPlayerInterior(playerid,PlayerInfo[plo][pInt]);

PlayerInfo[playerid][pInt] = PlayerInfo[plo][pInt];

PlayerInfo[playerid][pLocal] = PlayerInfo[plo][pLocal];

}

if(PlayerInfo[plo][pInt] == 10 && PlayerInfo[plo][pLocal] == 500)

            {

                          SendClientMessage(playerid, COLOR_GRAD2, "You can`t go to this player");

          return 1;

            }

if(PlayerInfo[playerid][pInt] == 0)

{

SetPlayerInterior(playerid,0);

}

if(plocz > 530.0 && PlayerInfo[plo][pInt] == 0) //the highest land point in sa = 526.8

{

SetPlayerInterior(playerid,1);

PlayerInfo[playerid][pInt] = 1;

}

if (GetPlayerState(playerid) == 2)

{

new tmpcar = GetPlayerVehicleID(playerid);

SetVehiclePos(tmpcar, plocx, plocy+4, plocz);

TelePos[playerid][0] = 0.0;TelePos[playerid][1] = 0.0;

}

else

{

SetPlayerPos(playerid,plocx,plocy+2, plocz);

}

GetPlayerName(playa, giveplayer, sizeof(giveplayer));

                        format(string, sizeof(string), " Ai fost teleportat la %s",giveplayer);

                        SendClientMessage(plo, COLOR_GREY, string);

if (PlayerInfo[playerid][pAdmin] >= 1)

{

GetPlayerName(playa, giveplayer, sizeof(giveplayer));

                            GetPlayerName(playerid, sendername, sizeof(sendername));

    format(string, sizeof(string), " Admin {F81414}%s {AFAFAF}has teleported at you!",sendername);

            SendClientMessage(plo, COLOR_GREY, string);

format(string,sizeof(string), "INFO: %s has teleported to %s",sendername, giveplayer);

ABroadCast(COLOR_LIGHTRED,string, 5);

        }

        if (PlayerInfo[playerid][pHelper] >= 1)

{

GetPlayerName(playa, giveplayer, sizeof(giveplayer));

                            GetPlayerName(playerid, sendername, sizeof(sendername));

format(string,sizeof(string), "INFO: %s has teleported to %s",sendername, giveplayer);

ABroadCast(COLOR_LIGHTRED,string, 5);

    format(string, sizeof(string), " Helper {F81414}%s {AFAFAF}has teleported at you!",sendername);

            SendClientMessage(plo, COLOR_GREY, string);

        }

SetPlayerVirtualWorld(playerid,GetPlayerVirtualWorld(plo));

HouseEntered[playerid] = HouseEntered[plo];

}

else

{

SendClientMessage(playerid, COLOR_GRAD1, "  Nu ai rangul administrativ necesar!");

}

}

}

else

{

format(string, sizeof(string), "  %d is not an active player.", plo);

SendClientMessage(playerid, COLOR_GRAD1, string);

}

}

return 1;

}[/pawn]

Link to comment
Share on other sites

[pawn]if(strcmp(cmd, "/goto", true) == 0)

{

    if(IsPlayerConnected(playerid))

    {

tmp = strtok(cmdtext, idx);

if(!strlen(tmp))

{

SendClientMessage(playerid, COLOR_GRAD2, "CMD: /goto [playerid/PartOfName]");

return 1;

}

new Float:plocx,Float:plocy,Float:plocz;

new plo;

plo = ReturnUser(tmp);

if (IsPlayerConnected(plo))

{

    if(plo != INVALID_PLAYER_ID)

    {

        if (PlayerInfo[playerid][pAdmin] >= 1 || PlayerInfo[playerid][pHelper] >= 1)

{

if(Spectate[playerid] != 255)

{

Spectate[playerid] = 256;

}

GetPlayerPos(plo, plocx, plocy, plocz);

if(PlayerInfo[plo][pInt] > 0 || GetPlayerInterior(plo) > 0)

{

    SetPlayerInterior(playerid,GetPlayerInterior(plo));

SetPlayerInterior(playerid,PlayerInfo[plo][pInt]);

PlayerInfo[playerid][pInt] = PlayerInfo[plo][pInt];

PlayerInfo[playerid][pLocal] = PlayerInfo[plo][pLocal];

}

if(PlayerInfo[playerid][pInt] == 0)

{

SetPlayerInterior(playerid,0);

}

if(plocz > 530.0 && PlayerInfo[plo][pInt] == 0) //the highest land point in sa = 526.8

{

SetPlayerInterior(playerid,1);

PlayerInfo[playerid][pInt] = 1;

}

if (GetPlayerState(playerid) == 2)

{

new tmpcar = GetPlayerVehicleID(playerid);

SetVehiclePos(tmpcar, plocx, plocy+4, plocz);

TelePos[playerid][0] = 0.0;TelePos[playerid][1] = 0.0;

}

else

{

SetPlayerPos(playerid,plocx,plocy+2, plocz);

}

format(string, sizeof(string), " Ai fost teleportat la playerul %s.", plo);

SendClientMessage(playerid, 0xA8A8FFFF, string);

SetPlayerInterior(playerid,GetPlayerInterior(plo));

PlayerInfo[playerid][pInt] = GetPlayerInterior(plo);

SetPlayerVirtualWorld(playerid,GetPlayerVirtualWorld(plo));

HouseEntered[playerid] = HouseEntered[plo];

}

else

{

SendClientMessage(playerid, COLOR_1RED, "Nu ai acces la aceasta comanda ");

}

}

}

else

{

format(string, sizeof(string), " That player is not connected.", plo);

SendClientMessage(playerid, COLOR_GRAD1, string);

}

}

return 1;

}[/pawn]

incearca asta

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. For more details you can also review our Terms of Use and Privacy Policy.