Author Topic: [Warchief] Buy And Save Skin (by me)  (Read 3375 times)

0 Members and 1 Guest are viewing this topic.

Offline aledark24

  • Made Man
  • ***
  • Posts: 206
  • I am a scripter and you have celous of me....so you crashed my servers
    • View Profile
[Warchief] Buy And Save Skin (by me)
« on: January 05, 2013, 09:09:59 pm »
[pawn]               else if (strcmp(cmd, "buyskin", true) == 0) {
        tmp = strtok(cmdtext, idx);
        new Dinero = GetPlayerMoney(playerid);
         if (!strlen(tmp)) Mensaje(playerid, NARANJA,"[System] - CORRECT USE: /c buyskin <ID>.");
         else if(!NeedPlayerInArea(playerid,407.6586,424.0244,1037.5781,1040.8357)) Mensaje(playerid, NARANJA,"[Error] - Only purchase GASH Store in North Point Mall");
       else {
              if (!IsNumeric(tmp)) Mensaje(playerid, ROJO,"[Error] -
Number of invalid skin");
              else if (strval(tmp) >=  107) Mensaje(playerid, ROJO,"[Error] - You can only buy up to 106.");
              else {
                     if(Dinero >= 1000) {
                   Mensaje(playerid, AMARILLO,"You bought a skin for use always use / c skin.");
                   Mensaje(playerid, AMARILLO,"You can only buy up to 106 skin.");
               SetPlayerSkin(playerid,strval(tmp));
                   DecPlayerHandCash(playerid,500);
                   SetPlayerRopaComprada(playerid,strval(tmp));
                   }
                   }
                              if(Dinero < 999) {
           SendClientMessage(playerid,AMARILLO,"The skin cost $ 1,000 can only buy up to 106 skin");
        }
   }
        return 1;
   }
              else if (strcmp(cmd, "skin", true) == 0) {
        tmp = strtok(cmdtext, idx);
       if ( !IsLoggedIn( playerid ) ) Mensaje( playerid, ROJO, "Login first" );
         if(GetPlayerRopa(playerid))
   {
   SetPlayerSkin(playerid,GetPlayerRopa(playerid));
        }
        return 1;
   }[/pawn]

Need define this public


[pawn]new MSN[256];[/pawn]
[pawn]//======================Guardado de ropa========================================
public GetPlayerRopa(playerid)
{
    format(MSN,256, REGISTROS_FILE, gPlayers[playerid]);//change to you register folder name
   new ropa; ropa = dini_Int(MSN,"skin");
   return ropa;
}
public SetPlayerRopaComprada(playerid,ropa)
{
    format(MSN,256, REGISTROS_FILE, gPlayers[playerid]);//change to you register folder name
   dini_IntSet(MSN,"skin",ropa);
}
//==============================================================================
public Mensaje(playerid, color, text [ ])
   {
   new Msn[256];
   format(Msn, 256, "Private Message >> %s", text);
   SendClientMessage(playerid, color, Msn);
   return 1;
   }

//==============================================================================
stock NeedPlayerInArea(playerid,Float:MinX,Float:MaxX,Float:MinY,Float:MaxY)
{
      new Float:x,Float:y,Float:z;
       GetPlayerPos(playerid, x, y, z);
       if(x >= MinX && x <= MaxX && y >= MinY && y <= MaxY) return 1;
       else return 0;
      return 1;
}
//==============================================================================[/pawn]
« Last Edit: January 11, 2013, 02:40:25 am by aledark24 »
I am a great scripter and you are celous of my works
.....

Vice City Life Multiplayer By Saint

Offline VS

  • Street Thug
  • *
  • Posts: 37
  • Opening Soon - VS Society
    • View Profile
Re: Buy And Save Skin (by me)
« Reply #1 on: January 10, 2013, 08:35:19 pm »
[pawn]
stock Mensaje(playerid, color, const text [ ])//i fixed this
{
   new string[128];//you dont even need 256 thats to high for a message function
   format(string,128, "Private Message >> %s",text);
   SendClientMessage(playerid,color,string);
   return 1;
}
[/pawn]
« Last Edit: January 11, 2013, 08:15:23 am by VS »

Offline aledark24

  • Made Man
  • ***
  • Posts: 206
  • I am a scripter and you have celous of me....so you crashed my servers
    • View Profile
Re: Buy And Save Skin (by me)
« Reply #2 on: January 10, 2013, 11:48:50 pm »
[pawn]
public Mensaje(playerid, color, const text [ ])//i fixed this
   {
   new string[128];//you dont even need 256 thats to high for a message function
   format(string,128, "Private Message >> %s",text);
   SendClientMessage(playerid,color,string);
   return 1;
   }
[/pawn]

but the function is working ???

buy and save skin?
I am a great scripter and you are celous of my works
.....

Vice City Life Multiplayer By Saint

Offline · KaTaNNa ·

  • Street Thug
  • *
  • Posts: 12
  • It's easy to talk about difficult mi.Lo is be me .
    • View Profile
Re: Buy And Save Skin (by me)
« Reply #3 on: January 11, 2013, 06:20:35 am »
[pawn]public Mensaje(playerid, color, text [ ])
   {
   new Msn[256];
   format(Msn, 256, "Private Message >> %s", text);
   SendClientMessage(playerid, color, Msn);
   return 1;
   }[/pawn]

Jajaja . El de Madara , espero que tenga su credito en tu server :P
« Last Edit: January 11, 2013, 06:22:31 am by · KaTaNNa · »
If you think you do dificil.No back ... go ahead and face it! ;D

Offline mrockxkingbutt

  • Crime Boss
  • ****
  • Posts: 373
  • I AM Best Scripter And You Are Not :P
    • View Profile
Re: Buy And Save Skin (by me)
« Reply #4 on: February 03, 2013, 01:28:55 am »
nice work Yo Good Job Really XD
My Servers Showroom!
www.jimxvcmpscripts.createaforum.com/

Quote from:  rohanaj60
i m a great script Editor

Rofl! lmao lol