Jump to content

Question

Posted

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 (

5 answers to this question

Recommended Posts

Posted

Adica vrei ceva de genul, /rtc 120 sa dea respawn la masina 120, nu ?

Sau cand un player foloseste /rc sa dea respawn la masina care are id-ul lui din pVeh?

Posted

Nu se poate.

Decat daca..faci sa se salveze fiecare "id" al fiecarei masini spawnate intr-o variabila..

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)

Guest RockStar
Posted

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.

Posted

[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] ?

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.