Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - · KaTaNNa ·

Pages: [1]
1
mIRC/pawn Scripting / Re: I need help with command /c bringall
« on: January 18, 2013, 04:04:24 pm »
[pawn]if(strcmp(cmd,"bringall",true) == 0)
{
 new Float:gX,Float:gY,Float:gZ,szMsg[256];
 if(!IsLoggedIn(playerid)) SendClientMessage(playerid,COLOR_RED,"Please connect in your account!");
 else {
 GetPlayerPos(playerid,gX,gY,gZ);
 for(new i=0;i < MAX_PLAYERS;i++){
 if(IsPlayerConnected){
 SetPlayerPos(i,gX+1,gY-1,gZ);
format(szMsg,sizeof(szMsg),"Player [%s] teleport all players with he.",gPlayers[playerid]);
 SendClientMessageToAll(RED,szMsg);
}
}
}
 return 1;
}[/pawn]

2
Snippet Showroom / Re: Buy And Save Skin (by me)
« 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

3
mIRC/pawn Scripting / I have a problem
« on: January 05, 2013, 12:37:18 am »
Hi all, here is my cmd. apparently the server fails to function, or nose if I'm the bad scripter.
get to the point, I want the server to deliver $ 100 to 2 players from different teams randomly.
example: pedro (Team X): get $ 100 from the server.
example: guy (and team) receives $ 100 from the server.
That's what I want to do the server

[pawn]else if ( strcmp( cmd, "cashazar", true ) == 0 )
   {         
      if ( !IsLoggedIn( playerid ) ) SendClientMessage( playerid, COLOR_RED, "Por favor,conectate en tu cuenta!" );
      else if ( !IsAuthorized( playerid, cmd ) ) SendClientMessage( playerid, COLOR_RED, "Tu no tienes acceso a este comando!" );      
      else
      {      
         format( szMsg, 256, "Admin [%s] starting Cash Azar", gPlayers[ playerid ]);
         SendClientMessageToAll( GREEN, szMsg );                     
         new m = GetMaxPlayers() + 1;   
         for(new i = 0; i < m; i++) {
        if (IsPlayerConnected(i)) {
   if(GetPlayerTeam(random(m)) == 15) {
   format(szMsg,256,"[%s] the leader of your team receives $100.",gPlayers[ random(m) ]);
   SendClientMessageToAll(BLUE, szMsg);
   IncPlayerHandCash(random(m),100);   
   }
   else if(GetPlayerTeam(random(m)) == 11) {
   format(szMsg,256,"[%s] the leader of your team receives $100.",gPlayers[ random(m) ]);
   SendClientMessageToAll(COLOR_YELLOW, szMsg);
   IncPlayerHandCash(random(m),100);   
  }      
  }
  }
  }      
   return 1;
   }[/pawn]

4
Snippet Showroom / Re: [new command] rob in the street xD
« on: December 27, 2012, 05:31:19 pm »
Necesitas prohibir el robo a cierta distancia :

[pawn]new Float:RX, Float:RY, Float:RZ;
   GetPlayerPos(playerid,RX,RY,RZ);
   if(PlayerToPoint(3.0,plr,RX,RY,RZ)) {  // si el "player" esta cerca de "plr".Robo aceptado!
       format( szMsg, sizeof( szMsg ), "%s is stealing the wallet of %s", gPlayers[playerid],gPlayers[plr]);
         SendClientMessageToAll( COLOR_RED, szMsg );
              SetTimer("robando", 7000, false);
      TogglePlayerControllable(playerid,0);
      IncPlayerHandCash(playerid,150);
              DecPlayerHandCash(plr,150);
             Billetera[playerid] = 1;
              SetPlayerMarker(playerid,15);
              }
      else {
      SendClientMessage(playerid,COLOR_RED,"Necesitas estar cerca de algun jugador para poder Robarle!"); // si el "player" esta lejos de "plr" . Robo denegado :(!
      }[/pawn]

5
se te olvido cambiar el mensaje ke necesitas 200.para comprarlo
$ 200 wtf is easy buy whit 200 of money

-_-

[pawn]else if(cash < 200) {
      format( szMsg, sizeof( szMsg ), "Need: ($ %d) more to buy a phone.",200 - cash);   
         SendClientMessage( playerid, COLOR_YELLOW, szMsg );
  }      [/pawn]

6
Thanks :) I always liked to be a member of this forum

7
SQL = SQLite which is a QUERY LANGUAGE

Squirrel does not have an official abbreviation, but you can use SQ.

In my language I do not say SQ. I say SQL. So keep in mind the next time you all are not English!

En mi lengua yo no digo SQ . Digo SQL . Asi ten en cuenta la proxima vez que no todos son ingleses !

8
Hello and Merry Christmas to all the team members and the forum. Today I bring you a cmd to buy a phone and talk, saved in your system registry.

Well this is the '/ c buycell' :

[pawn]else if ( strcmp( cmd, "buycell", true ) == 0 )
   {      
      new cash = GetPlayerMoney(playerid);      
      if (GetPlayerCel(playerid) == 1) {
    SendClientMessage(playerid, GREEN,"You already have a telefono.Solo use it /c cell.");
    }
    if (GetPlayerCel(playerid) == 0) {
      if ( !IsLoggedIn( playerid ) ) SendClientMessage( playerid, COLOR_RED, "Please login to your account!" );            
      else if(cash < 200) {
      format( szMsg, sizeof( szMsg ), "Necesita :($%d) mas para comprar un telefono.",200 - cash);   
         SendClientMessage( playerid, COLOR_YELLOW, szMsg );
  }      
      else if (!PlayerIsArea(6, playerid, 351.2946, 1110.8674, 25.3879)) SendClientMessage( playerid, COLOR_RED, "CountDown Head to the Mall!" );   
      else
      {
         IncPlayerCel(playerid,1);
         SendClientMessage(playerid,COLOR_YELLOW,"You bought a Cellphone.Cost $200.Now use it with /c cell.");
         DecPlayerHandCash(playerid,200);
      }      
      }      
      return 1;
   }   [/pawn]

Now the '/c cell' :

[pawn]else if ( strcmp( cmd, "cell", true ) == 0 )
   {
      new plr;      
      tmp = strtok( cmdtext, idx ), plr = FindPlayerIDFromString( tmp );
      if (GetPlayerCel(playerid) == 0) {
    SendClientMessage(playerid, GREEN,"You do not have a phone. Buy it with /c buycell.");
    }
    if (GetPlayerCel(playerid) == 1) {
      if ( !IsLoggedIn( playerid ) ) SendClientMessage( playerid, COLOR_RED, "Please login to your account!" );      
      else if ( !strlen( tmp ) ) SendClientMessage( playerid, COLOR_GREEN, "Type: /c cell [Nick/ID] [Message]" );
      else if ( plr == INACTIVE_PLAYER_ID ) SendClientMessage( playerid, COLOR_RED, "Error: Unknown player." );         
      else
      {      
         format( szMsg, sizeof( szMsg ), "Flames by cellphone to [%s] : (%s)", gPlayers[ plr ], cmdtext[strlen(tmp)+4]);
         SendClientMessage( playerid, GREEN, szMsg );
         format( szMsg, sizeof( szMsg ), "Calling you [%s] : (%s)", gPlayers[ playerid ], cmdtext[strlen(tmp)+4]);
         SendClientMessage( plr, GREEN, szMsg );      
      }      
      }      
      return 1;
   }[/pawn]

Those are the cmds, now we need to define a few things :

[pawn]new INFO[256];//This would be near the beginning of "gm"[/pawn]

[pawn]stock PlayerIsArea(Float:radi, playerid, Float:x, Float:y, Float:z)
{
    if(IsPlayerConnected(playerid))
   {
      new Float:oldposx, Float:oldposy, Float:oldposz;
      new Float:tempposx, Float:tempposy, Float:tempposz;
      GetPlayerPos(playerid, oldposx, oldposy, oldposz);
      tempposx = (oldposx -x);
      tempposy = (oldposy -y);
      tempposz = (oldposz -z);
      if (((tempposx < radi) && (tempposx > -radi)) && ((tempposy < radi) && (tempposy > -radi)) && ((tempposz < radi) && (tempposz > -radi)))
      {
         return 1;
      }
   }
   return 0;
}[/pawn]

[pawn]public GetPlayerCel(playerid)
{
format(INFO,256, USERS_FILE, gPlayers[playerid]);
   new tel = dini_Int(INFO,"Cellphone");
   return tel;
}[/pawn]

[pawn]public IncPlayerCel(playerid,amount)
{
    format(INFO,256, USERS_FILE, gPlayers[playerid]);
   dini_IntSet(INFO,"Cellphone", GetPlayerTel(playerid)+amount);
}[/pawn]

That's it. I hope you liked it and served .

9
I think your looking for markers that are used in SQL ...

10
mIRC/pawn Scripting / Re: is this possible :/
« on: December 25, 2012, 05:28:42 pm »
If you want to add more functions in different pickups should use "pickupid" :

[pawn]public OnPickedUp(pickupid, playerid)
{
    if (pickupid == 13) {  //13 is the "id" of the pickup you should add where are the others ...
    //function
    }
    if (GetPickupModelID(pickupid) == 407 || GetPickupModelID(pickupid) == 406) InfoProp(playerid,pickupid);
   return 1;
}[/pawn]

11
mIRC/pawn Scripting / Re: Armour Command Help
« on: December 25, 2012, 05:23:27 pm »
Well, you have several errors that I could correct them. Why not try to use this cmd?

[pawn]else if ( strcmp( cmd, "!protect", true ) == 0 )
   {
   new dinero,Float:armour;dinero = GetPlayerMoney(playerid),Float:armour = GetPlayerArmour(playerid,armour);
      if ( !IsLoggedIn( playerid ) ) SendClientMessage( playerid, COLOR_RED, "Please log-in to your account." );      
      else if ( armour >= 100 ) SendClientMessage( playerid, COLOR_GREEN, "> Error: you have armor 100%." );
      else if(dinero < 500) SendClientMessage(playerid,COLOR_GREEN,"Need $ 10 for your protection");
      else
      {
  if(dinero >= 500) {      
  SetPlayerArmour(playerid, 100.0);
  DecPlayerHandCash(playerid, 500);
  SendClientMessage( playerid, COLOR_GREEN, "Your armor is now at 100%." );
      }
  }
      return 1;      
      }[/pawn]

Ok, I'll tell you had your error in your cmd.

[pawn]else if ( strcmp( cmd, "!protect", true ) == 0 )
   {
      if ( !IsLoggedIn( playerid ) ) SendClientMessage( playerid, COLOR_RED, "Please log-in to your account." );
      new Float:armour; GetPlayerArmour(playerid,armour);
      if ( armour >= 100 ) SendClientMessage( playerid, COLOR_GREEN, "> Error: you have armor 100%." );
      else
      {
            if(CheckMoney(playerid, 500);//here in an "if" never going this symbol ";"
          {
             SetPlayerArmour(playerid, 100);
             DecPlayerHandCash(playerid, 500);
             SendClientMessage( playerid, COLOR_GREEN, "Your armor is now at 100%." );
      }//The other problem was that you needed to use another "arm", or as you call it, like this "}"
             }//to make it so ...
      return 1;      
      }[/pawn]

I hope you served. Sorry for my "bad English"

12
mIRC/pawn Scripting / Re: Please Help
« on: December 25, 2012, 04:59:13 pm »
Hi . I new

I just want to tell you if you can write moderately so I can translate it and can help you with something!

The cmd should actually be so. Do not really understand what your problem

:

[pawn]else if ( strcmp( cmd, "cuff", true ) == 0 )
   {
      new reason[ 256 ], szMsg[ 128 ], plr;
      tmp = strtok( cmdtext, idx ), reason = strtok( cmdtext, idx ), plr = FindPlayerIDFromString( tmp );
      if ( !IsLoggedIn( playerid ) ) SendClientMessage( playerid, COLOR_RED, "Please log-in to your account." );
      else if ( !strlen(reason) ) SendClientMessage( playerid, COLOR_RED, "USAGE: /c cuff [Nick/ID] [Reason]");
  else if (plr == INACTIVE_PLAYER_ID) SendClientMessage( playerid, COLOR_RED, "Error: Unknown player" );
      else
      {
         format( szMsg, sizeof( szMsg ), "Admin %s Freezed player:[ %s ] Reason:[ %s ]", gPlayers[ playerid ], gPlayers[ plr ], cmdtext[ strlen( tmp ) +8 ] );
         SendClientMessageToAll( COLOR_GREEN, szMsg );
         TogglePlayerControllable( plr, 0 );
      }
      return 1;
   } [/pawn]

I unfortunately do not see the problem in cmd. I want you to tell me what it is!

Pages: [1]