Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /****************************************************
- Include hecho por: Cesar_Goole
- Version : 1.0
- Teletransportaciones
- include: El siguiente include tiene como funcion
- teletransportar a uno o mas jugadores a una zona
- especifica sin tener que colocarlos en la misma
- posicion.
- ******************************************************/
- /*
- Uso de las Funciones :
- SetPlayerPosCuadrilateral(playerid,Float:x,Float:y,Float:z);
- SetAllPlayersPosCuadrilateral(Float:x,Float:y,Float:z);
- SetPlayerPosLine(playerid,Float:x,Float:y,Float:z);
- SetAllPlayersPosLine(Float:x,Float:y,Float:z);
- */
- #include <a_samp>
- forward SetPlayerPosCuadrilateral(playerid,Float:x,Float:y,Float:z);
- forward SetAllPlayersPosCuadrilateral(Float:x,Float:y,Float:z);
- forward SetPlayerPosLine(playerid,Float:x,Float:y,Float:z);
- forward SetAllPlayersPosLine(Float:x,Float:y,Float:z);
- public SetPlayerPosCuadrilateral(playerid,Float:x,Float:y,Float:z)
- {
- new Randon = random(4);
- switch(Randon)
- {
- case 0:SetPlayerPos(playerid,Float:x+20,Float:y+20,Float:z);
- case 1:SetPlayerPos(playerid,Float:x-20,Float:y-20,Float:z);
- case 2:SetPlayerPos(playerid,Float:x+20,Float:y,Float:z);
- case 3:SetPlayerPos(playerid,Float:x,Float:y-20,Float:z);
- }
- return 1;
- }
- public SetAllPlayersPosCuadrilateral(Float:x,Float:y,Float:z)
- {
- for(new i=0; i<MAX_PLAYERS; i++)
- {
- new Randon = random(4);
- switch(Randon)
- {
- case 0:SetPlayerPos(i,Float:x+30,Float:y+30,Float:z);
- case 1:SetPlayerPos(i,Float:x-30,Float:y-30,Float:z);
- case 2:SetPlayerPos(i,Float:x+30,Float:y,Float:z);
- case 3:SetPlayerPos(i,Float:x,Float:y-30,Float:z);
- }
- }
- return 1;
- }
- public SetPlayerPosLine(playerid,Float:x,Float:y,Float:z)
- {
- new Randon = random(7);
- switch(Randon)
- {
- case 0:SetPlayerPos(playerid,Float:x,Float:y+5,Float:z);
- case 1:SetPlayerPos(playerid,Float:x,Float:y+10,Float:z);
- case 2:SetPlayerPos(playerid,Float:x,Float:y+15,Float:z);
- case 3:SetPlayerPos(playerid,Float:x,Float:y+20,Float:z);
- case 4:SetPlayerPos(playerid,Float:x,Float:y+25,Float:z);
- case 5:SetPlayerPos(playerid,Float:x,Float:y+30,Float:z);
- case 6:SetPlayerPos(playerid,Float:x,Float:y+35,Float:z);
- }
- return 1;
- }
- public SetAllPlayersPosLine(Float:x,Float:y,Float:z)
- {
- for(new i=0; i<MAX_PLAYERS; i++)
- {
- new Randon = random(10);
- switch(Randon)
- {
- case 0:SetPlayerPos(i,Float:x,Float:y+5,Float:z);
- case 1:SetPlayerPos(i,Float:x,Float:y+10,Float:z);
- case 2:SetPlayerPos(i,Float:x,Float:y+15,Float:z);
- case 3:SetPlayerPos(i,Float:x,Float:y+20,Float:z);
- case 4:SetPlayerPos(i,Float:x,Float:y+25,Float:z);
- case 5:SetPlayerPos(i,Float:x,Float:y+30,Float:z);
- case 6:SetPlayerPos(i,Float:x,Float:y+35,Float:z);
- case 7:SetPlayerPos(i,Float:x,Float:y+40,Float:z);
- case 8:SetPlayerPos(i,Float:x,Float:y+45,Float:z);
- case 9:SetPlayerPos(i,Float:x,Float:y+50,Float:z);
- }
- }
- return 1;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement