Tri mala pitanja

Započeo Lumpri77, April 22, 2010, 18:52:53 POSLE PODNE

prethodna tema - sledeća tema

0 članova i 2 gostiju pregledaju ovu temu.

Evo malih pitanja PLS odgovor

* Kako da maknem BAÅ  SVA auta iz skripte i da sam stavljam nova
* Kako da na ovu komandu za enter stavim da me frezira na 2sec
Citatelse if (PlayerToPoint(8.0, playerid,1460.5590,-1011.8144,26.8438))
         {
             SetPlayerInterior(playerid,1);
            SetPlayerPos(playerid,4365.4482,-1545.6127,26.1698);
         }


edit

* Kako na ovu komandu dodat da s može samo u playertopoint 7.00 na odreÄ'ene kordinate

Citatif(strcmp(cmd, "/bank", true) == 0 || strcmp(cmd, "/deposit", true) == 0)
   {
       if(IsPlayerConnected(playerid))
       {
           if(PlayerInfo[playerid][pLocal] != 103)
           {
               SendClientMessage(playerid, COLOR_GREY, "   You are not at the Bank !");
               return 1;
           }
         tmp = strtok(cmdtext, idx);
         if(!strlen(tmp))
         {
            SendClientMessage(playerid, COLOR_GRAD2, "USAGE: /bank [amount]");
            format(string, sizeof(string), "  You Have $%d in your account.", PlayerInfo[playerid][pAccount]);
            SendClientMessage(playerid, COLOR_GRAD3, string);
            return 1;
         }
         new cashdeposit = strval(tmp);
         if(!strlen(tmp))
         {
            SendClientMessage(playerid, COLOR_GRAD2, "USAGE: /bank [amount]");
            format(string, sizeof(string), "  You Have $%d in your account.", PlayerInfo[playerid][pAccount]);
            SendClientMessage(playerid, COLOR_GRAD3, string);
            return 1;
         }
         if (cashdeposit > GetPlayerMoney(playerid) || cashdeposit < 1)
         {
            SendClientMessage(playerid, COLOR_GRAD2, "   You dont have that much");
            return 1;
         }
         GivePlayerMoney(playerid,-cashdeposit);
         new curfunds = PlayerInfo[playerid][pAccount];
         PlayerInfo[playerid][pAccount]=cashdeposit+PlayerInfo[playerid][pAccount];
         SendClientMessage(playerid, COLOR_WHITE, "|___ BANK STATMENT ___|");
         format(string, sizeof(string), "  Old Balance: $%d", curfunds);
         SendClientMessage(playerid, COLOR_GRAD2, string);
         format(string, sizeof(string), "  Deposit: $%d",cashdeposit);
         SendClientMessage(playerid, COLOR_GRAD4, string);
         SendClientMessage(playerid, COLOR_GRAD6, "|-----------------------------------------|");
         format(string, sizeof(string), "  New Balance: $%d", PlayerInfo[playerid][pAccount]);
         SendClientMessage(playerid, COLOR_WHITE, string);
         return 1;
      }
      return 1;
   }


Citat4352.5649,-1537.4598,26.1698
Poslednja Izmena: April 22, 2010, 18:56:41 POSLE PODNE od lumpri

Citat: lumpri poslato April 22, 2010, 18:52:53 POSLE PODNE
Evo malih pitanja PLS odgovor

* Kako da maknem BAŠ SVA auta iz skripte i da sam stavljam nova
* Kako da na ovu komandu za enter stavim da me frezira na 2sec
Citatelse if (PlayerToPoint(8.0, playerid,1460.5590,-1011.8144,26.8438))
         {
             SetPlayerInterior(playerid,1);
            SetPlayerPos(playerid,4365.4482,-1545.6127,26.1698);
         }


edit









* Kako na ovu komandu dodat da s može samo u playertopoint 7.00 na određene kordinate

Citatif(strcmp(cmd, "/bank", true) == 0 || strcmp(cmd, "/deposit", true) == 0)
   {
       if(IsPlayerConnected(playerid))
       {
           if(PlayerInfo[playerid][pLocal] != 103)
           {
               SendClientMessage(playerid, COLOR_GREY, "   You are not at the Bank !");
               return 1;
           }
         tmp = strtok(cmdtext, idx);
         if(!strlen(tmp))
         {
            SendClientMessage(playerid, COLOR_GRAD2, "USAGE: /bank [amount]");
            format(string, sizeof(string), "  You Have $%d in your account.", PlayerInfo[playerid][pAccount]);
            SendClientMessage(playerid, COLOR_GRAD3, string);
            return 1;
         }
         new cashdeposit = strval(tmp);
         if(!strlen(tmp))
         {
            SendClientMessage(playerid, COLOR_GRAD2, "USAGE: /bank [amount]");
            format(string, sizeof(string), "  You Have $%d in your account.", PlayerInfo[playerid][pAccount]);
            SendClientMessage(playerid, COLOR_GRAD3, string);
            return 1;
         }
         if (cashdeposit > GetPlayerMoney(playerid) || cashdeposit < 1)
         {
            SendClientMessage(playerid, COLOR_GRAD2, "   You dont have that much");
            return 1;
         }
         GivePlayerMoney(playerid,-cashdeposit);
         new curfunds = PlayerInfo[playerid][pAccount];
         PlayerInfo[playerid][pAccount]=cashdeposit+PlayerInfo[playerid][pAccount];
         SendClientMessage(playerid, COLOR_WHITE, "|___ BANK STATMENT ___|");
         format(string, sizeof(string), "  Old Balance: $%d", curfunds);
         SendClientMessage(playerid, COLOR_GRAD2, string);
         format(string, sizeof(string), "  Deposit: $%d",cashdeposit);
         SendClientMessage(playerid, COLOR_GRAD4, string);
         SendClientMessage(playerid, COLOR_GRAD6, "|-----------------------------------------|");
         format(string, sizeof(string), "  New Balance: $%d", PlayerInfo[playerid][pAccount]);
         SendClientMessage(playerid, COLOR_WHITE, string);
         return 1;
      }
      return 1;
   }


Citat4352.5649,-1537.4598,26.1698





aute mices tako da ih obrises, u search meni upisi:

AddStaticVehicle

i obrises sve sto pocinje sa AddStaticVehicle

za onaj freeze mislim da treba timer...
a za ovu banku...

if(strcmp(cmd, "/bank", true) == 0 || strcmp(cmd, "/deposit", true) == 0)
{
    if(IsPlayerConnected(playerid))
    {
        if(PlayerInfo[playerid][pLocal] != 103)
        {
            SendClientMessage(playerid, COLOR_GREY, "   You are not at the Bank !");
            return 1;
        }
tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_GRAD2, "USAGE: /bank [amount]");
format(string, sizeof(string), "  You Have $%d in your account.", PlayerInfo[playerid][pAccount]);
SendClientMessage(playerid, COLOR_GRAD3, string);
return 1;
}
new cashdeposit = strval(tmp);
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_GRAD2, "USAGE: /bank [amount]");
format(string, sizeof(string), "  You Have $%d in your account.", PlayerInfo[playerid][pAccount]);
SendClientMessage(playerid, COLOR_GRAD3, string);
return 1;
}
if (cashdeposit > GetPlayerMoney(playerid) || cashdeposit < 1)
{
SendClientMessage(playerid, COLOR_GRAD2, "   You dont have that much");
return 1;
}
GivePlayerMoney(playerid,-cashdeposit);
new curfunds = PlayerInfo[playerid][pAccount];
PlayerInfo[playerid][pAccount]=cashdeposit+PlayerInfo[playerid][pAccount];
SendClientMessage(playerid, COLOR_WHITE, "|___ BANK STATMENT ___|");
format(string, sizeof(string), "  Old Balance: $%d", curfunds);
SendClientMessage(playerid, COLOR_GRAD2, string);
format(string, sizeof(string), "  Deposit: $%d",cashdeposit);
SendClientMessage(playerid, COLOR_GRAD4, string);
SendClientMessage(playerid, COLOR_GRAD6, "|-----------------------------------------|");
format(string, sizeof(string), "  New Balance: $%d", PlayerInfo[playerid][pAccount]);
SendClientMessage(playerid, COLOR_WHITE, string);
return 1;
}
return 1;
}


izmijeni if(PlayerInfo[playerid][pLocal] != 103)
sa if(PlayerToPoint(2, playerid,x,y,z))


Poslednja Izmena: April 22, 2010, 19:15:22 POSLE PODNE od Haris Hadzic


[BP] HeLoX ba! ^^
Forum: balkan-paradise.info- Još u izradi!

Citat: lumpri poslato April 22, 2010, 18:52:53 POSLE PODNE
      else if (PlayerToPoint(8.0, playerid,1460.5590,-1011.8144,26.8438))
         {
             SetPlayerInterior(playerid,1);
            SetPlayerPos(playerid,4365.4482,-1545.6127,26.1698);
         }
Dodaš ovo negdje izmedu komande
TogglePlayerControllable(playerid, 1);
ali moras i timere postavit...

Citat: °|Chris|° poslato April 22, 2010, 20:08:24 POSLE PODNE
Citat: lumpri poslato April 22, 2010, 18:52:53 POSLE PODNE
      else if (PlayerToPoint(8.0, playerid,1460.5590,-1011.8144,26.8438))
         {
             SetPlayerInterior(playerid,1);
            SetPlayerPos(playerid,4365.4482,-1545.6127,26.1698);
         }
Dodaš ovo negdje izmedu komande
TogglePlayerControllable(playerid, 1);
ali moras i timere postavit...
ili ne? :S:..
TogglePlayerControllable(playerid, 0);...
to je za freezanje...

evo hvala za banku sam uspio napravit



Citatili ne? :S:..
TogglePlayerControllable(playerid, 0);...
to je za freezanje...


na kolko dugo ??? meni treba na 2 sec samo kako to postavit
Poslednja Izmena: April 22, 2010, 20:41:15 POSLE PODNE od lumpri

Citat: lumpri poslato April 22, 2010, 20:40:27 POSLE PODNE
evo hvala za banku sam uspio napravit



Citatili ne? :S:..
TogglePlayerControllable(playerid, 0);...
to je za freezanje...


na kolko dugo ??? meni treba na 2 sec samo kako to postavit
To ti je freezabhe 4ever dok ne upises unfreeze zato moras timer sloziti


poslozi timer ovako:

forward imetimera(playerid);

public imetimera(playerid)
{
      TogglePlayerControllable(playerid, 1);
      return 1;
}

//ovo stavi tamo gdje radis nesto sa komandom a zelis da te freeza
TogglePlayerControllable(playerid, 0);
SetTimerEx("imetimera",2000,false,"i",playerid);


ovo je vrlo jednostavno....
Mnogi me znaju, a mnogi misle da znaju.

evo malo san njubast xD uspio sam ovo s timerom za nešto šta sam ja radio ali kako to isto anpravit za bizz ( nema kordinata u game modu nego su u script files mapi ) zapravo je to ulaz u banku