Jump to content

Question

5 answers to this question

Recommended Posts

Posted

CMD:goto(playerid,params[])

{

    if(IsPlayerConnected(playerid))

    {

    if(gPlayerLogged[playerid] != 0)

    {

        new Float:PosX, Float:PosY, Float:PosZ, Float:PosIDX, Float:PosIDY, Float:PosIDZ, string[256], sendername[MAX_PLAYER_NAME], giveplayername[MAX_PLAYER_NAME], ID;

        if(sscanf(params, "u", ID)) return SendClientMessage(playerid, -1, ""PORTOCALIU"Scrie: "ALBASTRU2"/goto [Player ID]");

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

GetPlayerName(ID, giveplayername, sizeof(giveplayername));

if(IsPlayerConnected(ID))

{

    if(ID != INVALID_PLAYER_ID)

    {

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

{

GetPlayerPos(ID, PosIDX, PosIDY, PosIDZ);

if (GetPlayerState(playerid) == 2 || GetPlayerState(playerid) == 3)

{

new tmpcar = GetPlayerVehicleID(playerid);

SetVehiclePos(tmpcar, PosIDX, PosIDY + 4, PosIDZ);

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

LinkVehicleToInterior(tmpcar, GetPlayerInterior(ID));

SetVehicleVirtualWorld(tmpcar, GetPlayerVirtualWorld(ID));

SetPlayerInterior(playerid, GetPlayerInterior(ID));

SetPlayerVirtualWorld(playerid, GetPlayerVirtualWorld(ID));

}

else

{

SetPlayerPos(playerid, PosIDX, PosIDY + 2, PosIDZ);

SetPlayerInterior(playerid, GetPlayerInterior(ID));

SetPlayerVirtualWorld(playerid, GetPlayerVirtualWorld(ID));

}

format(string, 256, ""GRI3"You have been teleported to: %s", giveplayername);

SendClientMessage(playerid, -1, string);

format(string, 256, ""PORTOCALIU"Admin Warning: "GALBEN"%s a folosit comanda "VERDE"/goto "GALBEN"si s-a teleportat la %s", sendername, giveplayername);

AdminsMessage(-1, string);

format(string, 256, ""PORTOCALIU"Helper Warning: "GALBEN"%s a folosit comanda "VERDE"/goto "GALBEN"si s-a teleportat la %s", sendername, giveplayername);

HeadHelpersMessage(-1, string);

GetPlayerPos(playerid, PosX, PosY, PosZ);

GBPosX[playerid] = PosX;

GBPosY[playerid] = PosY;

GBPosZ[playerid] = PosZ;

}

else return SendClientMessage(playerid, -1, ""ALBASTRU2"Nu ai autorizatia sa folosesti aceasta comanda !");

}

}

else return SendClientMessage(playerid, -1, ""GRI3"Acest player nu este conectat");

}

else return SendClientMessage(playerid, -1, ""ALBASTRU2"Nu esti conectat !");

}

return 1;

}

Posted

[tt]Uite comanda mult mai simpla:

CMD:goto( playerid, params[ ] )

{

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

{

new Player, Float: rPos[ 3 ] ;

if ( sscanf( params, "u", Player ) )

return SendClientMessage( playerid, -1, "Synthax: /goto <PartOfName>" ) ;

else if ( Player == INVALID_PLAYER_ID )

return SendClientMessage( playerid, -1, "Error: Acest jucator nu este pe server !" ) ;

else if ( Player == playerid )

return SendClientMessage( playerid, -1, "Error: Nu poti sa te teleportezi la tine !" ) ;

else

{

GetPlayerPos( Player, rPos[ 0 ], rPos[ 1 ], rPos[ 2 ] ) ;

SetPlayerInterior( playerid, GetPlayerInterior( Player ) ) ;

SetPlayerVirtualWorld( playerid, GetPlayerVirtualWorld( Player ) ) ;

if ( GetPlayerState( playerid ) == 2 )

{

SetVehiclePos( GetPlayerVehicleID( playerid ), rPos[ 0 ] + 3, rPos[ 1 ], rPos[ 2 ] ) ;

LinkVehicleToInterior( GetPlayerVehicleID( playerid ), GetPlayerInterior( Player ) ) ;

SetVehicleVirtualWorld( GetPlayerVehicleID( playerid ), GetPlayerVirtualWorld( Player ) ) ;

}

else SetPlayerPos( playerid, rPos[ 0 ] + 2, rPos[ 1 ], rPos[ 2 ] ) ;

}

}

    return ( 1 ) ;

}[/tt]

7bdea99b11.png

rimmon curv.

Posted

Am sters comanda si am inlocuit-o cu aceasta dar imi nu-mi merge pawno cand dau compile:

http://imgur.com/VluOHV4

Click dreapta pe pawno.exe,proprietes and compatibility.

Bifezi Run this program in compatibility mode for.

Apply and Ok.

Daca nu functioneaza nici asa,lasa reply.

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.