Szerző Téma: /goto  (Megtekintve 1192 alkalommal)

Nem elérhető VTX

  • 2402
    • Profil megtekintése
/goto
« Dátum: 2010. Április 15. - 20:56:52 »
0
Egy /goto script kéne, amit mindenki tud használni.
[/goto ID, tehát pl /goto 8 és odatelézik a 8-as ID-ju playerhez]

/goto
« Válasz #1 Dátum: 2010. Április 16. - 04:56:16 »
0
délután megírom neked :)

Nem elérhető Popec16

  • 1267
    • Profil megtekintése
/goto
« Válasz #2 Dátum: 2010. Április 16. - 11:44:40 »
0
Vampesz inkább aludjál -04:56:16 kor :d

Nem elérhető Depi

  • 2259
  • Még mindig TrYp. :)
    • Profil megtekintése
/goto
« Válasz #3 Dátum: 2010. Április 16. - 13:58:08 »
0
Idézetet írta: Popec16 date=1271411080\" data-ipsquote-contentapp=\"forums\" data-ipsquote-contenttype=\"forums\" data-ipsquote-contentid=\"1378\" data-ipsquote-contentclass=\"forums_Topic
Vampesz inkább aludjál -04:56:16 kor :d
 
Ez offnak számit  :) Nem segítség.
Am mért nem nézed ki egy Admin Scriptbol ?  :)

Nem elérhető VTX

  • 2402
    • Profil megtekintése
/goto
« Válasz #4 Dátum: 2010. Április 16. - 14:01:31 »
0
gAdminban nem találom, és csak az van meg.

Nem elérhető Depi

  • 2259
  • Még mindig TrYp. :)
    • Profil megtekintése
/goto
« Válasz #5 Dátum: 2010. Április 16. - 14:33:57 »
0
Itt a fórumon van egy két admin script a Szkripter/Mappok Fórum részben azt hiszem,nézd meg azokat lehet benne van  :)

Nem elérhető maark

  • 565
    • Profil megtekintése
/goto
« Válasz #6 Dátum: 2010. Április 16. - 20:01:14 »
0
#include <a_samp>
new name[MAX_PLAYER_NAME];
#define COLOR_RED                 0xAA3333AA
public OnPlayerCommandText(playerid, cmdtext[])
{
    new tmp[64], cmd[64], string[128];
    new giveplayerid, idx;
    cmd = strtok(cmdtext, idx), tmp = strtok(cmdtext, idx);
    giveplayerid = strval(tmp);
   
    if(strcmp(cmd, \"/goto\", true) == 0)
    {
if(!strlen(tmp))
{
   return SendClientMessage(playerid, COLOR_RED, \"Használat: /goto [playerid]\");
}
if(giveplayerid == playerid)
{
   SendClientMessage(playerid, 0xFB0000FF, \"HIBA: Nem teleportálhatsz magadhoz!\");
   } else {
   if(IsPlayerConnected(giveplayerid))
   {
            GetPlayerName(giveplayerid, name, sizeof(name));
               format(string, sizeof(string), \"Oda teleportáltál %s nevu játékoshoz!\", name);
                  SendClientMessage(playerid, COLOR_RED, string);
   new Float:x, Float:y, Float:z;
   GetPlayerPos(giveplayerid, x, y, z);
   new cartype = GetPlayerVehicleID(playerid);
   new State=GetPlayerState(playerid);
            SetPlayerInterior(playerid,0);
   {
   if(State!=PLAYER_STATE_DRIVER)
   {
   SetPlayerPos(playerid,x+0.3, y, z);
   }
   else if(IsPlayerInVehicle(playerid, cartype) == 1)
   {
   SetVehiclePos(cartype,x+0.3, y, z);
   SetVehicleZAngle(cartype,270);
   }
   else
   {
   SetPlayerPos(playerid,x+0.3, y, z);
   }
   }
      } else {
   SendClientMessage(playerid, 0xFB0000FF, \"Nincs ilyen játékos!\");
   }
   return 1;
}
}
return 0;
}
 
strtok(const string[], &index)
{
new length = strlen(string);
while ((index < length) && (string[index] <= \' \'))
{
index++;
}
new offset = index;
new result[20];
while ((index < length) && (string[index] > \' \') && ((index - offset) < (sizeof(result) - 1)))
{
result[index - offset] = string[index];
index++;
}
result[index - offset] = EOS;
return result;
}

/goto
« Válasz #7 Dátum: 2010. Április 16. - 20:05:06 »
0
Ez talán átláthatóbbá tenné...
 
stock Goto(playerid, toplayerid)
{
new Float:x[3];
GetPlayerPos(toplayerid,x[0],x[1],x[2]);
SetPlayerPos(playerid,x[0],x[1]-2.2,x[2]+0.5);
return 1;
}

Nem elérhető VTX

  • 2402
    • Profil megtekintése
/goto
« Válasz #8 Dátum: 2010. Április 20. - 20:58:57 »
0
maark a tied sehogy sem muködik, Gamestar a tiedet meg nem értem.  :dead:
Valaki leírná?  ::|
« Utoljára szerkesztve: 2010. Április 20. - 21:20:54 írta VTX »

/goto
« Válasz #9 Dátum: 2010. Április 20. - 22:54:47 »
0
if(strcmp(cmd, \"/goto\", true)
{
      tmp = strtok(cmdtext, idx);
      giveplayerid = ReturnUser(tmp);
      Goto(playerid, giveplayerid)
      return 1;
}
stock Goto(playerid, toplayerid)
{
new Float:x[3];
GetPlayerPos(toplayerid,x[0],x[1],x[2]);
SetPlayerPos(playerid,x[0],x[1]-2.2,x[2]+0.5);
return 1;
}

 
Megírtam így semmi feltétellel.(Köszönet Gamestarnak a 2. feléért(megnem mondom, h hogy hívják :D))

 

SimplePortal 2.3.7 © 2008-2024, SimplePortal