Vice City Multiplayer

VC:MP 0.3 => mIRC/pawn Scripting => ShowRoom (pawn) => Topic started by: aledark24 on February 15, 2013, 12:06:00 am

Title: save you pos for spawn!!
Post by: aledark24 on February 15, 2013, 12:06:00 am
Hello again, today i teach you how make the command for spawn in one location always.. if you "save you position"
|Video|
http://www.youtube.com/watch?v=l957Ac0kBP0&feature=youtu.be (http://www.youtube.com/watch?v=l957Ac0kBP0&feature=youtu.be)

[pawn]new Float:CoordX[MAX_PLAYERS];
new Float:CoordY[MAX_PLAYERS];
new Float:CoordZ[MAX_PLAYERS];[/pawn]

In the command "REGISTER" COPY THIS DINI_SET

      [pawn]   dini_Set( file, "pX", "-695.528503" );
         dini_Set( file, "pY", "706.554931" );
         dini_Set( file, "pZ", "12.116538" );[/pawn]


IN ONPLAYERTEXT

   [pawn]          else if ( strcmp( cmd, "!spawn", true ) == 0 )
   {
         tmp = strtok( cmdtext, idx );
         new Dinero = GetPlayerMoney(playerid);
      if ( !IsLoggedIn( playerid ) ) SendClientMessage( playerid, 0xF0182DFF, "Login first." );
         else
       {
      if(Dinero >= 1500) {
    format(file, sizeof(file), USERS_FILE, gPlayers[playerid]);
    GetPlayerPos(playerid, CoordX[playerid], CoordY[playerid], CoordZ[playerid]);
   dini_FloatSet(file, "pY", CoordY[playerid]);
    dini_FloatSet(file, "pZ", CoordZ[playerid]);
     dini_FloatSet(file, "pX", CoordX[playerid]);
    SendClientMessage(playerid,0xFFFF00AA,"You are saved you position to spawn");
           DecPlayerHandCash(playerid,1500);
          }
           if(Dinero < 1499) {
           SendClientMessage(playerid,0xFFFF00AA,"Need more money to save you position, need $ 1500");
           }
}
       return 1;
   }[/pawn]

in ONPLAYERSPAWN

[pawn]SetPlayerPos(playerid, dini_Float(file, "pX"), dini_Float(file, "pY"), dini_Float(file, "pZ"),0,0);
SendClientMessage(playerid,0xFFFF00AA,"You have send to you last position saved");[/pawn]



If you need thank me, send me a pm
Title: Re: save you pos for spawn!!
Post by: omersami2 on November 29, 2013, 01:49:07 am
Hello again, today i teach you how make the command for spawn in one location always.. if you "save you position"
|Video|
http://www.youtube.com/watch?v=l957Ac0kBP0&feature=youtu.be (http://www.youtube.com/watch?v=l957Ac0kBP0&feature=youtu.be)

[pawn]new Float:CoordX[MAX_PLAYERS];
new Float:CoordY[MAX_PLAYERS];
new Float:CoordZ[MAX_PLAYERS];[/pawn]

In the command "REGISTER" COPY THIS DINI_SET

      [pawn]   dini_Set( file, "pX", "-695.528503" );
         dini_Set( file, "pY", "706.554931" );
         dini_Set( file, "pZ", "12.116538" );[/pawn]


IN ONPLAYERTEXT

   [pawn]          else if ( strcmp( cmd, "!spawn", true ) == 0 )
   {
         tmp = strtok( cmdtext, idx );
         new Dinero = GetPlayerMoney(playerid);
      if ( !IsLoggedIn( playerid ) ) SendClientMessage( playerid, 0xF0182DFF, "Login first." );
         else
       {
      if(Dinero >= 1500) {
    format(file, sizeof(file), USERS_FILE, gPlayers[playerid]);
    GetPlayerPos(playerid, CoordX[playerid], CoordY[playerid], CoordZ[playerid]);
   dini_FloatSet(file, "pY", CoordY[playerid]);
    dini_FloatSet(file, "pZ", CoordZ[playerid]);
     dini_FloatSet(file, "pX", CoordX[playerid]);
    SendClientMessage(playerid,0xFFFF00AA,"You are saved you position to spawn");
           DecPlayerHandCash(playerid,1500);
          }
           if(Dinero < 1499) {
           SendClientMessage(playerid,0xFFFF00AA,"Need more money to save you position, need $ 1500");
           }
}
       return 1;
   }[/pawn]

in ONPLAYERSPAWN

[pawn]SetPlayerPos(playerid, dini_Float(file, "pX"), dini_Float(file, "pY"), dini_Float(file, "pZ"),0,0);
SendClientMessage(playerid,0xFFFF00AA,"You have send to you last position saved");[/pawn]



If you need thank me, send me a pm
Nice MAn Keep It UP
Title: Re: save you pos for spawn!!
Post by: MatheuS on November 29, 2013, 02:33:31 am
scripts created by me, where are my credits aledark?  :o
Title: Re: save you pos for spawn!!
Post by: mrockxkingbutt on December 01, 2013, 02:34:38 pm
nice!
Title: Re: save you pos for spawn!!
Post by: mrockxkingbutt on December 11, 2013, 01:03:47 am
Aledark You Have Been Failed In This CMD!  :-\  :-\  :-\  :-\

Check My Spawnloc Functions
That I Workable

YoU Forgot To Add SPawnloc Off Function + This Save Pos Of Spawn Then Never Teleports To Savedlocs

LOL Failed