Jump to content

Question

Posted

1.Cum as putea face o comanda se se foloseasca intre anumite ore (ex:/heal poti folosi intre 12:00 - 19:00)

2.Cum as putea face o comanda sa o foloseasca doar cei din jail?

3 answers to this question

Recommended Posts

Posted
if(strcmp(cmd, "/healjail", trune) == 0)
{
    if(IsPlayerConnected(playerid))
     {
        if(PlayerInfo[playerid][pJailed] >= 1)
        {
             new h;
             gettime(h);
             if(h >= 12 && h <= 19)
             {
                    SetPlayerHealth(playerid, 100);
                    SendClientMessage(playerid, 0xFF8A8AFF,  "Ai folosit comanda /healjail si ti-ai umplut  viata !");
             }
             else
             {
                     SendClientMessage(playerid, 0xFF8A8AFF, "Poti folosi aceasta comanda doar intre orele 12:00 - 19:00");
              }
          }
          else if(PlayerInfo[playerid][pJailed] < 1)
          {
                  SendClientMessage(playerid, 0xFF8A8AFF, "Trebuie sa fi in jail pentru a folosi aceasta comanda");
          }
       }
   }

S-ar putea sa`ti dea cateva erori ... nu sunt sigur .. eu nu am testat`o !

A fost usor sa te iubim ...,

      Acum e imposibil sa te uitam !

Posted

if(strcmp(cmd, "/healjail", trune) == 0)
{
    if(IsPlayerConnected(playerid))
     {
        if(PlayerInfo[playerid][pJailed] >= 1)
        {
             new h;
             gettime(h);
             if(h >= 12 && h <= 19)
             {
                    SetPlayerHealth(playerid, 100);
                    SendClientMessage(playerid, 0xFF8A8AFF,  "Ai folosit comanda /healjail si ti-ai umplut  viata !");
             }
             else
             {
                     SendClientMessage(playerid, 0xFF8A8AFF, "Poti folosi aceasta comanda doar intre orele 12:00 - 19:00");
              }
          }
          else if(PlayerInfo[playerid][pJailed] < 1)
          {
                  SendClientMessage(playerid, 0xFF8A8AFF, "Trebuie sa fi in jail pentru a folosi aceasta comanda");
          }
       }
   }

S-ar putea sa`ti dea cateva erori ... nu sunt sigur .. eu nu am testat`o !

As vrea sa fac o comanda gen "/curte" daca pun "else if(PlayerInfo[playerid][pJailed] < 1)" in comanda va merge?

Guest
This topic is now closed to further replies.
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • 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.