Jump to content

Cum faci mai multe spawnuri la teleporturi


Rimmon

Recommended Posts

Deci nu stiu nici eu prea bine dar incerc sa va spun..

pentru inceput vom face asa

[pawn]new Float:gRandomPlayerSpawn[4][0] = {

{},

{ },

{},

{}

};//intre aceste acolade pui locurile de spawn aici pui mai multe coordonate pentru a avea mai multe spawnuri[/pawn]

Dupa mai facem un new adica asa

[pawn]new iSpawnSet[MAX_PLAYERS];[/pawn]

Dupa vom face un forward

[pawn]forward SetPlayerSpawn(playerid);[/pawn]

In Loc de SetPlayerSpawn puteti inlocui cu ce vreti voi

Ok acum ca am facut forwardu

vom face ceva degenu asta

[pawn]public SetPlayerSpawn(playerid)

{

    if (iSpawnSet[playerid] == 0)

    {

new rand = random(sizeof(gRandomPlayerSpawn));

SetPlayerPos(playerid, gRandomPlayerSpawn[rand][0], gRandomPlayerSpawn[rand][1], gRandomPlayerSpawn[rand][2]); // Car Sumo Others

}

return 1;

}[/pawn]

new rand = random (zizeoff(gRandomPlayerSpawn)); arata ca indeplineste functia de mai sus

[pawn] new Float:gRandomPlayerSpawn[/pawn]

adica asta

Ok acum ca sa avem mai multe spawnuri la un teleport vom pune asta

[pawn]SetPlayerSpawn(playerid);[/pawn] la un teleport

Sper ca vam ajutat

Stiu ca nu e tocmai un toturial dar nici eu nu stiu foarte bine cum se face si am incercat sa va explic cum stiu eu mai bine

Massari e curva mea

Link to comment
Share on other sites

  • 5 weeks later...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.