Szerző Téma: Animba esés  (Megtekintve 1743 alkalommal)

Animba esés
« Dátum: 2010. Június 22. - 10:51:16 »
0 Show voters
Üdv,Szeretnék kérni segítséget azzal kapcsolatban,hogy letöltöttem a Magyar GF modot,és még kezdo vagyok a scriptelésben.

Szeretnék kérni egy olyan modot ahol az emberek,pl rálonek,vagy 30 alá megy a hpjuk,leesnek valahonnan akkor animba essenek,pl összegrönyed vagy azt a bizonyos helyzetet pl /crack vagy ilyesmi anim lenne benne.Köszönöm elore is.


És lenne még 1 kérésem,megcsinálom a kapumat és nem muködik,egy olyan mintát is kérnék ha tudnátok segíteni!


köszönöm! :D

Nem elérhető Mambo

  • 4239
    • Profil megtekintése
Animba esés
« Válasz #1 Dátum: 2010. Június 22. - 11:02:52 »
0 Show voters
#include <a_samp>
#define FILTERSCRIPT
#if defined FILTERSCRIPT
new lift;
public OnFilterScriptInit()
{
    lift = CreateObject(18553, 226.433655, 1872.436768, 14.026321, 0.0000, 0.0000, 180.0000);
return 1;
}
#else
public OnGameModeInit()
{
    lift = CreateObject(18553, 226.433655, 1872.436768, 14.026321, 0.0000, 0.0000, 180.0000);
return 1;
}
#endif
public OnPlayerCommandText(playerid, cmdtext[])
{
if(strcmp(cmdtext, \"/lift-fel\", true) == 0)
    {
         MoveObject(lift, 226.433655, 1872.436768, 11.401323, 2.0);
          return 1;
    }
    if(strcmp(cmdtext, \"/lift-le\", true) == 0)
    {
         MoveObject(lift, 226.433655, 1872.436768, 14.026321, 2.0);
          return 1;
    }
return 0;
}

Animba esés
« Válasz #2 Dátum: 2010. Június 22. - 11:05:39 »
0 Show voters
De én kaput szeretnék ha tudnátok,ez lift,am melyik a moveobject meg createobject? ami a földbe van v aminek mozognia kell?

Nem elérhető Mambo

  • 4239
    • Profil megtekintése
Animba esés
« Válasz #3 Dátum: 2010. Június 22. - 11:09:49 »
0 Show voters
#include <a_samp>
#define FILTERSCRIPT
#if defined FILTERSCRIPT
new kapu;
public OnFilterScriptInit()
{
   kapu = CreateObject(18553, 226.433655, 1872.436768, 14.026321, 0.0000, 0.0000, 180.0000);
return 1;
}
#else
public OnGameModeInit()
{
   kapu = CreateObject(18553, 226.433655, 1872.436768, 14.026321, 0.0000, 0.0000, 180.0000);
return 1;
}
#endif
public OnPlayerCommandText(playerid, cmdtext[])
{
if(strcmp(cmdtext, \"/nyit\", true) == 0)
   {
        MoveObject(kapu, 226.433655, 1872.436768, 11.401323, 2.0);
         return 1;
   }
   if(strcmp(cmdtext, \"/zar\", true) == 0)
   {
        MoveObject(kapu, 226.433655, 1872.436768, 14.026321, 2.0);
         return 1;
   }
return 0;
}

 
Ha nyílik, akkor oda rakod a kaput, ahova kell. Ha zárod, alaphelyzetbe vissza

Nem elérhető Zharko

  • 1955
  • Future House <3
    • Profil megtekintése
Animba esés
« Válasz #4 Dátum: 2010. Június 22. - 14:44:03 »
0 Show voters
Off: Legegyszerubb: Ha megölik, ki banolja azt a karinevet xD És regisztrálni meg tud másik néven. Szerintem jó ötlet :D

Animba esés
« Válasz #5 Dátum: 2010. Június 23. - 08:34:08 »
0 Show voters
Tudna valaki egy jólmuködo kaput scriptet bemásolni,vagy feltölteni mert ha én ezt:
if(!strcmp(cmdtext, \"/gateopen\", true)) // By Ellis
{
    if(PlayerInfo[playerid][pLeader] == 1 || PlayerInfo[playerid][pLeader] == 2 || PlayerInfo[playerid][pLeader] == 3 || PlayerInfo[playerid][pMember] == 1 || PlayerInfo[playerid][pMember] == 2 || PlayerInfo[playerid][pMember] == 3)
    {
        if (PlayerToPoint(15, playerid,1589.053344,-1638.123168,14.122960))
   {
            MoveObject(pdgate1,1599.053344,-1638.123168,14.122960, 0.8);
            SetTimer(\"GateClose\", 12000, 0);
            SendClientMessage(playerid, COLOR_BLUE,\"A garage is opened and will close in 7 seconds.\");
            GetPlayerName(playerid, sendername, sizeof(sendername));
            format(string, sizeof(string), \"* %s takes his/her remote and opens a garage.\", sendername);
            ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
            PlayerPlaySound(playerid, 1153, 1589.053344,-1638.123168,14.122960);
   }
ez egy szeruen,beírom a progimba és 26 hibát ír ki... valaki kérem segitsen!

Nem elérhető ptlevi

  • 235
    • Profil megtekintése
Animba esés
« Válasz #6 Dátum: 2010. Június 23. - 09:55:19 »
0 Show voters
Idézetet írta: pocc26 date=1277274848\" data-ipsquote-contentapp=\"forums\" data-ipsquote-contenttype=\"forums\" data-ipsquote-contentid=\"2121\" data-ipsquote-contentclass=\"forums_Topic
Tudna valaki egy jólmuködo kaput scriptet bemásolni,vagy feltölteni mert ha én ezt:
if(!strcmp(cmdtext, \"/gateopen\", true)) // By Ellis
{
    if(PlayerInfo[playerid][pLeader] == 1 || PlayerInfo[playerid][pLeader] == 2 || PlayerInfo[playerid][pLeader] == 3 || PlayerInfo[playerid][pMember] == 1 || PlayerInfo[playerid][pMember] == 2 || PlayerInfo[playerid][pMember] == 3)
    {
        if (PlayerToPoint(15, playerid,1589.053344,-1638.123168,14.122960))
   {
            MoveObject(pdgate1,1599.053344,-1638.123168,14.122960, 0.8);
            SetTimer(\"GateClose\", 12000, 0);
            SendClientMessage(playerid, COLOR_BLUE,\"A garage is opened and will close in 7 seconds.\");
            GetPlayerName(playerid, sendername, sizeof(sendername));
            format(string, sizeof(string), \"* %s takes his/her remote and opens a garage.\", sendername);
            ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
            PlayerPlaySound(playerid, 1153, 1589.053344,-1638.123168,14.122960);
   }
ez egy szeruen,beírom a progimba és 26 hibát ír ki... valaki kérem segitsen!
 
Nem zártad be a scriptet...

Nem elérhető Iceaac

  • 2187
    • Profil megtekintése
Animba esés
« Válasz #7 Dátum: 2010. Június 23. - 12:33:47 »
0 Show voters
Animba esés grat see és fay copy. És Ti miért segítetek neki copyban? (kapu nem az)

Nem elérhető DrAkE

  • 2078
    • Profil megtekintése
Animba esés
« Válasz #8 Dátum: 2010. Június 26. - 21:30:20 »
0 Show voters
tessék(animba esés):
 
#include <a_samp>
new Float:health;
forward for20hp(playerid);
public for20hp(playerid)
{
    #pragma unused playerid
    for(new x=0; x<GetMaxPlayers(); x++) {
        GetPlayerHealth(x,health);
        if(health < 30)// ez azt jelenti ha az élet kisseb mint 30
        { //akkor
            ApplyAnimation(playerid,\"CRACK\",\"crckdeth2\",4.1,1,1,1,1,1); //nyomjon be egy ApplyAnimationt
        }
    }
    return 1;
}
public OnFilterScriptInit() { return SetTimer(\"for20hp\", 1000, 1); }
public OnPlayerCommandText(playerid, cmdtext[])
{
   new giveplayerid, idx;
   new tmp[256];
   new cmd[256];
   cmd = strtok(cmdtext, idx);
   
   if(strcmp(cmd, \"/felsegit\",true) == 0)
   {
       if (giveplayerid == playerid)
      {
         SendClientMessage(playerid, 0xFFFF00AA, \"Magadat nem segítheted fel.\");
      }
        tmp = strtok(cmdtext, idx);
       if(!strlen(tmp))
       {
          SendClientMessage(playerid, 0xFFFFFFAA, \"HASZNÁLD: /segit [playerid]\");
             return 1;
       }
       giveplayerid = strval(tmp);
          if(IsPlayerConnected(giveplayerid))
          {
              SetPlayerHealth(giveplayerid,30);
              ClearAnimations(giveplayerid);
              SendClientMessage(playerid, 0xFFFFFFAA, \"Felsegítetted a játékost.\");
              SendClientMessage(giveplayerid, 0xFFFFFFAA, \"Menj, gyorsan tölsd fel az életed!\");
             return 1;
          }
             else
          {
             SendClientMessage(playerid, 0xFFFFFFAA, \"Nincs ilyen ID!\");
           }
         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;
}

GroX

  • Vendég
Animba esés
« Válasz #9 Dátum: 2010. Június 26. - 23:31:23 »
0 Show voters


public for20hp(playerid)
{
   #pragma unused playerid
   for(new x=0; x<GetMaxPlayers(); x++) {
       GetPlayerHealth(x,health);
       if(health < 30)// ez azt jelenti ha az élet kisseb mint 30
       { //akkor
           ApplyAnimation(playerid,\"CRACK\",\"crckdeth2\",4.1,1,1,1,1,1); //nyomjon be egy ApplyAnimationt
       }
   }
   return 1;
}

 
[/quote]
Ennek nagyon nincs sok értelme.
Létrehozol egy playerid argumentumos prototípust, de ha ciklust használsz minek a playerid?
Akkor már SetTimerEx-et használjunk... Sokkal takarékosabb...
Ráadásul az ApplyAnimation csak a 0-s azonosítójú játékosnak fog lefutni így...
Inkább így lenne helyes:
 
public for20hp(playerid)
{      
   new Float:health;
   GetPlayerHealth(playerid,health);
   if(health < 30)// ez azt jelenti ha az élet kisseb mint 30
   { //akkor
        ApplyAnimation(playerid,\"CRACK\",\"crckdeth2\",4.1,1,1,1,1,1); //nyomjon be egy ApplyAnimationt
   }
   return 1;
}
new pTimer[MAX_PLAYERS];
public OnPlayerConnect(playerid)
{
   pTimer[playerid] = SetTimerEx(\"for20hp\",1000,1,\"i\",playerid);
   return 1;
}
public OnPlayerDisconnect(playerid)
{
   KillTimer(pTimer[playerid]);
   return 1;
}

Nem elérhető Game94

  • 405
    • Profil megtekintése
Animba esés
« Válasz #10 Dátum: 2010. Június 27. - 11:58:05 »
0 Show voters
Idézetet írta: Iceaac date=1277289227\" data-ipsquote-contentapp=\"forums\" data-ipsquote-contenttype=\"forums\" data-ipsquote-contentid=\"2121\" data-ipsquote-contentclass=\"forums_Topic
Animba esés grat see és fay copy. És Ti miért segítetek neki copyban? (kapu nem az)
 
Már nem azért , de ez szinte minden rp-s szerveren ott van . És szerintem nem azt kérdezte hogy copy e vagy nem , hanem azt hogy hogyan lehet megcsinálni . Hadjad had csinálja , majd ha jól tud scriptelni akkor úgyis rájön hogy a saját ötletek a legjobbak . Addig is tanul ezekbol a scriptekbol .
« Utoljára szerkesztve: 2010. Június 27. - 11:59:38 írta Game94 »

Nem elérhető Epsilon

  • 1854
    • Profil megtekintése
Animba esés
« Válasz #11 Dátum: 2010. Június 27. - 13:50:15 »
0 Show voters
Idézetet írta: Game94 date=1277632685\" data-ipsquote-contentapp=\"forums\" data-ipsquote-contenttype=\"forums\" data-ipsquote-contentid=\"2121\" data-ipsquote-contentclass=\"forums_Topic
Hadjad had csinálja , majd ha jól tud scriptelni akkor úgyis rájön hogy a saját ötletek a legjobbak . Addig is tanul ezekbol a scriptekbol .
 
Erre gondolom rögtön fogadnál is..
ZÁRNI!

 

SimplePortal 2.3.7 © 2008-2024, SimplePortal