SA-MP Forums Archive
[ajuda] Teleporte - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: Non-English (https://sampforum.blast.hk/forumdisplay.php?fid=9)
+--- Forum: Languages (https://sampforum.blast.hk/forumdisplay.php?fid=33)
+---- Forum: Português/Portuguese (https://sampforum.blast.hk/forumdisplay.php?fid=34)
+---- Thread: [ajuda] Teleporte (/showthread.php?tid=309265)



[ajuda] Teleporte - NesQ - 06.01.2012

Boas, eu tou fazendo um server de DM e queria fazer um Teleporte (/DM 1) e que nesse teleporte as pessoas perdessem todas as armas que tem e ganhasem as que eu quero que ganhe.

Cmd
if(strcmp("/dm1", cmdtext, true, 10) == 0)
{
CarregarObjetosPlayer(playerid);
GivePlayerWeapon(playerid, 35, 800);
GameTextForPlayer(playerid, "~n~~g~~h~DM 1", 5000, 5);
MensagemTeleporte(playerid, "DM 1");
SetPlayerPos(playerid, 2450.3457, -2880.7126, 7.601;
SetPlayerFacingAngle(playerid, 178.5182);
SetCameraBehindPlayer(playerid);
SetPlayerInterior(playerid, 0);
SetPlayerVirtualWorld(playerid, 0);
return 1;


Re: [ajuda] Teleporte - Hardware - 06.01.2012

pawn Код:
if(strcmp("/dm1", cmdtext, true, 10) == 0)
{
    CarregarObjetosPlayer(playerid);
    ResetPlayerWeapons(playerid); // resetarб as armas, logo apуs, dк as armas aos players.
    GivePlayerWeapon(playerid, 35, 800);
    GameTextForPlayer(playerid, "~n~~g~~h~DM 1", 5000, 5);
    MensagemTeleporte(playerid, "DM 1");
    SetPlayerPos(playerid, 2450.3457, -2880.7126, 7.601;
    SetPlayerFacingAngle(playerid, 178.5182);
    SetCameraBehindPlayer(playerid);
    SetPlayerInterior(playerid, 0);
    SetPlayerVirtualWorld(playerid, 0);
    return 1;
}
Faзa o teste.


Re: [ajuda] Teleporte - RNT - 07.01.2012

Tenta aew , bota as tua coordenadas aonde pede !
Quote:

if(strcmp(cmdtext,"/DM 1",true)==0)
{
new vehicleid = GetPlayerVehicleID(playerid);
new State = GetPlayerState(playerid);
if(IsPlayerInAnyVehicle(playerid) && State == PLAYER_STATE_DRIVER)
{
GameTextForPlayer(playerid,"Voce foi para o DM 1 , cuidado !",4000,6);
LinkVehicleToInterior(vehicleid,0);
SetPlayerInterior(playerid,0);
return SetVehiclePos(vehicleid,bote aqui as coodenadas x,y,z);
}
SetPlayerPos(playerid,bote aqui as coodenadas x,y,z);
SetPlayerInterior(playerid,0);
GameTextForPlayer(playerid,"Voce foi para o DM 1 , cuidado !",4000,6);
return 1;
}