Jump to content

[Tutorial] Teleport


andybtv

Recommended Posts

Deci vrei sa faci o comanda care sa te teleporteze undeva si nu stii cum ??? ??? ??? ??

Ei bine in acest tutorial am sa iti arat.

Teleport cu masina

Sus la script punem:

  
new vehicleid = GetPlayerVehicleID(playerid);
new State = GetPlayerState(playerid);
Si asta o sa o pui sub:
public OnPlayerCommandText(playerid, cmdtext[])

if(strcmp(cmdtext, "/comanda", true)==0)
{  

  if(IsPlayerInAnyVehicle(playerid) && State == PLAYER_STATE_DRIVER)
  {
    return SetVehiclePos(vehicleid,XX,YY,ZZ),  //coordonate
    GameTextForPlayer(playerid, "~r~Text!", 5000, 5); // textul asta il v-a spune cand te vei teleporta
  }
  SetPlayerPos(playerid,XX,YY,ZZ);  //coordonate
  GameTextForPlayer(playerid, "~b~Text!", 5000, 5); // textul asta il v-a spune cand te vei teleporta
return 1;
}
Teleport simplu Acesta este cel mai simplu teleport dupa parerea mea sub 
public OnPlayerCommandText(playerid, cmdtext[])
pui:
    if(strcmp(cmdtext, "/comanda", true)==0)
   {
    SetPlayerPos(playerid, XX,YY,ZZ);
    GameTextForPlayer(playerid, "Text!", 5000, 5);
    return 1;
    }

Dictionar

~b~ = albastru

~r~ = rosu

~w~ = alb

Link to comment
Share on other sites

  • 3 months later...

eu-incepator :( ...cum pun comanda de teleportare si unde sa ma teleporteze???

prima data trebuie sa afli comenzile unde vrei sa fi teleportat ( intri in samp si dai /save la locu dorit )

apoi intri in server/pawno/pawno.exe deschizi modu Ctrl+f te duci la Public OnPlayerCommand si dedesupt pui comanda de teleport ( ti-a dat-o mai sut ) , in loc de xx,yy,zz pui cordonatele din samp ( le gasesti in folderu San Andreas SavePosition )

andybtv bun tutorialu pentru cei incepatori Gj ( ai 1 + )

default.png

 

Link to comment
Share on other sites

Guest cosmion

SetPlayerPos(playerid,AddPlayerClass(180,-2334.8801,-1646.7010,483.7031,23.0000,0,0,0,0,0,0); // ); - aceasta e linia

te\Untitled.pwn(93) : error 001: expected token: ",", but found ";" - aceasta e eroarea

Link to comment
Share on other sites

SetPlayerPos(playerid,AddPlayerClass(180,-2334.8801,-1646.7010,483.7031,23.0000,0,0,0,0,0,0); // ); - aceasta e linia

te\Untitled.pwn(93) : error 001: expected token: ",", but found ";" - aceasta e eroarea

fa-o asa:

SetPlayerPos(playerid,-2334.8801,-1646.7010,483.7031);

Tu ai copiat dupa playerid, tot ... trebuiau doar x,y,z coordonatele de mai sus ( mai pe intelesu tau 180 e skinu care nu-l copiezi apoi copiezi pana la a-3-a virgula si sa se termine ); )

default.png

 

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.