Jump to content
  • 0

Intrebare


bL3s

Question

Cum pot face o comanda care sa respawneze un vehicul anume.

Gen

if(strcmp(cmd, "/respawncar", true) == 0 || strcmp(cmd, "/rc", true) == 0)

{

    if(IsPlayerConnected(playerid))

    {

        if(PlayerInfo[playerid][pVeh] == 5 )

{

    SendClientMessage(playerid, COLOR_GRAD1, "  you are not authorized to use that command!");

    return 1;

}

if(CarRespawn(pVEH))

{

GameTextForPlayer(playerid, "~r~Car Respawned", 5000, 1);

}

}

return 1;

}

Deci daca playerul are pVeh = 5 sa respawneze masina cu id 5 (

Link to comment
Share on other sites

5 answers to this question

Recommended Posts

Guest RockStar

Bineinteles ca se poate.

http://wiki.sa-mp.com/wiki/Function:SetVehicleToRespawn

Este un lucru basic, tu cand dai /rtc 120 el face SetVehicleToRespawn(120)

Stiu, exact de aceea am dat edit inainte sa postezi tu.

Mi-am adus aminte.

Link to comment
Share on other sites

[pawn]

  if(strcmp(cmd, "/respawncar", true) == 0 || strcmp(cmd, "/rc", true) == 0)

  {

      if(IsPlayerConnected(playerid))

      {

          if(PlayerInfo[playerid][pVeh] == 5 )

        {

            SendClientMessage(playerid, COLOR_GRAD1, "  you are not authorized to use that command!");

            return 1;

        }

            tmp = strtok(cmdtext,idx);

            if(!strlen(tmp))return SendClientMessage(playerid,~0,"Use /rc [iD]");

            pVEH = strval(tmp); //cred ca 'CarRespawn' respawneaza masina si tot tacamul de GF.

            if(CarRespawn(pVEH))

            {

              GameTextForPlayer(playerid, "~r~Car Respawned", 5000, 1);

            }

      }

      return 1;

  }[/pawn] ?

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.