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 - dream

Pages: [1]
1
mIRC/pawn Scripting / Re: Help me!Come in !
« on: March 11, 2013, 05:36:00 pm »
use this:
[pawn]}
else if (strcmp(cmd, "!rules", true) == 0){
          SendClientMessageToAll(COLOR_YELLOW, "put the first rule");
          SendClientMessageToAll(COLOR_YELLOW, "put the second rule");
       return 1;[/pawn]


 error 054: unmatched closing brace
error 010: invalid function or declaration
error 010: invalid function or declaration
have errors? i think you didn't understand.

2
mIRC/pawn Scripting / Re: Help me!Come in !
« on: March 03, 2013, 11:59:54 am »
use this:
[pawn]}
else if (strcmp(cmd, "!rules", true) == 0){
          SendClientMessageToAll(COLOR_YELLOW, "put the first rule");
          SendClientMessageToAll(COLOR_YELLOW, "put the second rule");
       return 1;[/pawn]

3
mIRC/pawn Scripting / Re: Who can help me?
« on: February 27, 2013, 02:31:57 pm »
use this
[pawn]else if ( strcmp( cmd, "!getcar", true ) == 0 )
    {
         tmp = strtok( cmdtext, idx );
      if ( !strlen( tmp ) ) SendClientMessage( playerid, COLOR_GREEN, "USAGE: !getcar [VehicleID]" );
      else
      {
         new Float:Angle;
         GetPlayerPos( playerid, x, y, z); GetPlayerFacingAngle( playerid,Angle);
         if ( !Angle) SendClientMessage( playerid, COLOR_GREEN, "Error: Invalid vehicle!" );

         SetVehiclePos( strval( tmp ),x+3,y+3,z,Angle);
         format( szMsg, sizeof( szMsg ), "Spawning vehicle:[ %d ]", strval( tmp ) );
         SendClientMessage( playerid, COLOR_GREEN, szMsg );      }
      return 1;[/pawn]

4
mIRC/pawn Scripting / Re: How to make the game ads
« on: February 17, 2013, 04:27:15 pm »
Here
[pawn]     else if ( strcmp( cmd, "news", true ) == 0 )
   {
      tmp = strtok( cmdtext, idx );
      if ( !IsLoggedIn( playerid ) ) SendClientMessage( playerid, COLOR_RED, "Please log-in to your account." );
      else if ( !IsAuthorized( playerid, cmd ) ) SendClientMessage( playerid, COLOR_RED, "You don't have access to use this command!" );
      else if ( !strlen( tmp ) ) { SendClientMessage( playerid, COLOR_GREEN, "USAGE: /c news [Message]" ); }
      else
      {
         new szMsg[ 128 ];
         format( szMsg, 128, "News By %s : %s", gPlayers[ playerid ], cmdtext[ 3 ] );
         SendClientMessageToAll( RED, szMsg );
      }
      return 1;
      } [/pawn]
you just have to write /c news like news by spider join the server visit our forum etc

i have one more which can save your news
[pawn]      else if (strcmp(cmd, "setnews", true) == 0) {
      new setnews[256];
      tmp = strtok(cmdtext, idx);
      if(!IsPlayerAdmin(playerid)) SendClientMessage(playerid, COLOR_RED, "You need to Rcon login first!");
      else if (!strlen(tmp)) SendClientMessage(playerid,COLOR_RED,"USAGE: /c setnews text");
      else {
         format(file, sizeof(file), "/News/News.ini", "News");
            format(setnews,sizeof(setnews),"By [%s]> %s ",gPlayers[playerid],cmdtext[7]);
         dini_Set(file, "News", setnews);
      }
      return 1;
   }[/pawn]
timer
[pawn]SetTimer("DisplayNews",1000*60*1,1);[/pawn]
public
[pawn]public DisplayNews()
{
new Msg[256];
      new xgv[256];
   format(file, sizeof(file), "/News/News.ini");
   xgv = dini_Get(file, "News");
   
          format(Msg,sizeof(Msg),"News>:%s",xgv);
         SendClientMessageToAll(COLOR_YELLOW, Msg);

}[/pawn]
you have to make a folder
News and in folder News.ini
good luck
Thanks!!!

5
mIRC/pawn Scripting / How to make the game ads
« on: February 17, 2013, 09:34:26 am »
plz help me :)

6
mIRC/pawn Scripting / Re: Question about spawned as XXX
« on: February 15, 2013, 12:01:34 pm »
[pawn]public OnPlayerSpawn(playerid,classid,teamid)/*当一个玩家开此游戏*/
{
new szMsg[256],plname[24];
   GetPlayerName(playerid,plname,24);
   format(szMsg,256,"%s spawned.",plname);
   SendClientMessageToAll(COLOR_YELLOW,szMsg);
   return 1;
}[/pawn]
这应该可以

但是我要SPAWNED AS的。这东西谁不会啊。。。。
你这只是最原始的SPAWN。。。
那没办法,我也同求这个啊

7
mIRC/pawn Scripting / Re: Question about spawned as XXX
« on: February 15, 2013, 10:45:42 am »
[pawn]public OnPlayerSpawn(playerid,classid,teamid)/*当一个玩家开此游戏*/
{
new szMsg[256],plname[24];
   GetPlayerName(playerid,plname,24);
   format(szMsg,256,"%s spawned.",plname);
   SendClientMessageToAll(COLOR_YELLOW,szMsg);
   return 1;
}[/pawn]
这应该可以

Pages: [1]