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

Pages: [1] 2
1
mIRC/pawn Scripting / error (type mismatch)
« on: December 23, 2012, 04:40:48 pm »
Code: [Select]
stock IsPlayerInArea(playerid,Float:x1,Float:x2,Float:y1,Float:y2)
{
        new sgf;
        new Float:xmax , Float:xmin , Float:ymax , Flaot:ymin;
        if (x1 > x2) { xmax = x1; xmin = x2; }
        if (x1 < x2) { xmax = x2; xmin = x1; }
        if (y1 > y2) { ymax = y1; ymin = y2; } // type mismatch here
        if (y1 < y2) { ymax = y2; ymin = y1; } // here allsaw
        new Float:x , Float:y , Float:z;
        GetPlayerPos(playerid,x,y,z);
        if (xmin < x < xmax && ymin < y < ymax) sgf = 1; // and here
        else sgf = 0;
        return sgf;
 
}

2
Support / Re: Windows normal vc:mp server
« on: December 22, 2012, 01:39:20 pm »
allright allright , i understood you cant give me teh code cuz it may be dangerous to use from someone like me but , just tell me if this is right , and if it is , give me a list or a command list for vcmp windows server RPCs
Code: [Select]
// XServer.cpp : Defines the entry point for the console application.
//
#include <iostream>
#include "RakPeerInterface.h"
#include "PacketLogger.h"
#include <stdlib.h>
#include "WindowsIncludes.h"
#include "Gets.h"
#include "RPC4Plugin.h"
#include "RakSleep.h"

using namespace RakNet;

RPC4 rpc4;

void CFunc1( RakNet::BitStream *bitStream, RakNet::BitStream *returnData, Packet *packet )
{
//printf("CFunc3 ");
RakNet::RakString data;
//int offset=bitStream->GetReadOffset();
bool read = bitStream->ReadCompressed(data);
RakAssert(read);
printf("%s\n", data.C_String());
returnData->WriteCompressed("CFunc7");
};

int main()
{
RakNet::RakPeerInterface *sv = RakNet::RakPeerInterface::GetInstance();
//RakNet::PublicKey *pk;
//if(sv->Connect("127.0.0.1",5192,"ios",sizeof("ios"),0) == RakNet::CONNECTION_ATTEMPT_STARTED) printf("Connection started!\n");
//sv->Connect("127.0.0.1",5192,"ios",sizeof("ios"),0);
//rpc4.RegisterBlockingFunction("CFunc1", CFunc1);
RakNet::Packet *pak;
sv->AttachPlugin(&rpc4);
RakNet::SocketDescriptor sod;
sv->Startup(10,&sod,1);
sv->Connect("127.0.0.1",1234,"ios",sizeof("ios"));
char msg[2048];


RakNet::BitStream comp1 , comp2;
while(1)
{
Gets(msg,sizeof(msg));
if (strcmp(msg,"connect") == 0)
{
comp1.Write(6);
comp1.Write(sizeof("ion"));
comp1.Write("ion",sizeof("ion"));
rpc4.Call("ClientJoin",&comp1,HIGH_PRIORITY,RELIABLE_ORDERED,0,sv->GetSystemAddressFromIndex(0),false);
for(pak=sv->Receive();pak;sv->DeallocatePacket(pak),pak=sv->Receive())
{
printf("%s\n",pak->data);
break;
}
}
}


//rpc4.CallBlocking("Blocking",&comp1,HIGH_PRIORITY,RELIABLE_ORDERED,0,sv->GetSystemAddressFromIndex(0),&comp2);
/*
while (1)
{
Gets(msg,sizeof(msg));
if (strcmp(msg,"signal") == 0)
{
rpc4.CallBlocking("Blocking",&comp1,HIGH_PRIORITY,RELIABLE_ORDERED,0,sv->GetSystemAddressFromIndex(0),&comp2);
for(pak=sv->Receive();pak;sv->DeallocatePacket(pak),pak=sv->Receive());
{
RakNet::RakString rcs;
bool rdt = comp2.ReadCompressed(rcs);
printf("%s\n",rcs.C_String());
break;
}
}
*/
for(pak=sv->Receive();pak;sv->DeallocatePacket(pak),pak=sv->Receive())
{

printf("%s\n",pak->data);


}

//}

//for(pak=sv->Receive();pak;sv->DeallocatePacket(pak),sv->Receive())
// ;
//RakNet::RakString rcs1;
//bool rdt = comp1.ReadCompressed(rcs1);
//printf("it is : %s\n",rcs1.C_String());
// break;
//}



getchar();

RakNet::RakPeerInterface::DestroyInstance(sv);
return 0;
}



notice : i tested sv->connect , returns true so it connects , but when i type msg , i dont recive something ... oh and the .call retrurns null ... thx

3
Support / Windows normal vc:mp server
« on: December 21, 2012, 10:43:49 am »
I need some details about the 0.3z(R2) servers :
1. The params for the server converted in c++ Connect() (RakPeerInterference.h library) void . Here are the params found in config.ini :
ip : 127.0.0.1
listen port : 5192
rcon port : 5192
password (admin) = lol
password (server) = false (i mean it isnt enabled)
so if someone can convert it in that code , ex : Connect("127.0.0.1",5192,....);
2.The minimum and specify the functions i need to make and continue a simple connection to server. Ex :
- you need to connect to it
- you need to send it (bla bla bla)
3.Aditional things i might know about connecting to this server.
<<THX IN ADVENCE>>

                                                                                                                                                                                     (scripter_pawn)

4
Support / Re: vcmp-src-01c
« on: December 19, 2012, 09:39:07 am »
well everything seems to be allright , but when i downlaoded raknet , i discovered that some .h files are missing for ex : NetworkTypes.h , couldnt found it in the raknet folder and on the internet is only a old NetworkTypes.h file :( so my conclusion is that raknet has some missing files .... is there any thread ?

5
Support / vcmp-src-01c
« on: December 15, 2012, 10:26:09 pm »
So , i downloaded vcmp-src-01c.rar and opened it
i tryed to assembly the 'server' folder - fail
could someone help me , idk tourial or direct team viewer ?

6
mIRC/pawn Scripting / Re: just a little appeal/help
« on: December 14, 2012, 11:59:21 pm »
Solution1 : change from pawn to squirrel/mirc
Solution2 :  Use
Code: [Select]
new car1;
car1 = GetVehicleID(CreateVehicle(params));
use in the commands : GetPlayerPos(Float:x,Float:y,Float:z); car1.SetVehiclePos(x1,y1,z1);

7
mIRC/pawn Scripting / help via pawno code 2
« on: April 18, 2012, 06:03:06 pm »
http://pastebin.com/QfKYUYKP

stucks at "while" , startpoint == 49

8
mIRC/pawn Scripting / help via pawno code
« on: April 17, 2012, 07:30:15 pm »
Code: [Select]
new startpoint = 46;
new geter[MAX_STRING] , fgh[256];
format(fgh,256,"%s.txt","objects");
  strcat(geter,dini_Get(fgh,valstr(startpoint)));//298
// (298) : error 035: argument type mismatch (argument 1)

9
mIRC/pawn Scripting / Re: ehhh shit connection
« on: January 03, 2012, 04:25:16 pm »
squirrel

10
mIRC/pawn Scripting / ehhh shit connection
« on: January 03, 2012, 04:14:28 pm »
cant connect to my server , i mean i can but at stage where it connects it show this :
Connecting to 127.0.0.1
Connecteion succesful , loading network game .
than nothing happens ....

11
mIRC/pawn Scripting / Re: loto cmd
« on: December 26, 2011, 10:46:56 am »
FROM "MIRC RFS" wich is mine to "FBS" for example
i will try to convert it ...
Code: [Select]
else if ( $3 == loto ) {
if ( !FBS.Level($1,$2) ) vcmp.msg $1 $2 Please register
elseif (FBS.lin($1,$2) != 1 ) vcmp.msg $1 $2 Please login
elseif ( RFS.Level($1,$2) < 4 ) vcmp.msg $1 $2 You need at least level 4 to use this cmd
;here you will need to add an loto.ini in your script folder
elseif ($readini(loto.ini,$vcmp.name($1,$2),alr) = 1 ) vcmp.msg $1 $2 You cant try one more today ...
elseif ($FBS.actcash($1,$2) < 2000 ) vcmp.msg $1 $2 You need to have at least 2000 $+ $
else {
FBS.DecCash $1 $2 2000
vcmp.msg $1 $2 Loto started good luck
timer.ralr 1 18000 writeini loto.ini $vcmp.name($1,$2) alr 0
if ( $rand = 56 ) {
vcmp.say $1 **Player $vcmp.name($1,$2) has won to loto !!!
vcmp.announce $1 $2 ~y~W~b~i~y~n~b~n~y~e~b~r~o~
vcmp.msg $1 $2 You won to loto and recived price : 100.000 $+ $
FBS.IncCash $1 $2 $calc(FBS.actcash($1,$2)+100.000)
}
else vcmp.msg $1 $2 Too bad you losed , try next time :)
}
}

12
mIRC/pawn Scripting / loto cmd
« on: December 26, 2011, 01:51:45 am »
Code: [Select]
  else if ( $3 = loto ) {
    if ( $readini(accounts.ini,$vcmp.name($1,$2),log) = 0 ) vcmp.msg $1 $2 Please register/login to use this command
    if ( !$readini(accounts.ini,$vcmp.name($1,$2),level) ) vcmp.msg $1 $2 Please register/login to use this command
    elseif ( $readini(accounts.ini,$vcmp.name( $1,$2),alr) = 1 ) vcmp.msg $1 $2 Sorry today you losed your chance , try after 5 hours
    elseif ( $readini(accounts.ini,$vcmp.name($1,$2),cash) < 2000 ) vcmp.msg $1 $2 You need at least 2000 dollars !
    else {
      writeini accounts.ini $vcmp.name($1,$2) alr 1
      var %temp = $rand(1,100)
      timer.loto 1 18000 writeini accounts.ini $vcmp.name($1,$2) alr 0
      vcmp.msg $1 $2 Loto started good luck !!!
      if ( %temp = 56 ) {
        writeini accounts.ini $vcmp.name($1,$2) cash $calc($readini(accounts.ini,$vcmp.name($1,$2),cash) + 100000)
        vcmp.announce $1 $2 ~y~W~b~i~y~n~b~n~y~e~b~r~o~!
        vcmp.say $1 Pay atention ! , $vcmp.name( $1,$2) has just won 100.000 dollars
        vcmp.msg $1 $2 Well done :)
      }
      else vcmp.msg $1 $2 Too bad :( you losed , good luck next time
    }
  }
It should work for all mirc scripts , but you will need to convert my to ur script

13
mIRC/pawn Scripting / strange car bug
« on: December 25, 2011, 11:47:27 pm »
Code: [Select]
else if ( $3 == getcar ) {
    if ( $readini(accounts.ini,$vcmp.name($1,$2),log) = 0 ) vcmp.msg $1 $2 Please register/login
    elseif ( !$readini(accounts.ini,$vcmp.name($1,$2),level) ) vcmp.msg $1 $2 Need to register first
    else if ( !$4 ) vcmp.msg $1 $2 USE : /c getcar [id]
    else if ( !$readini(cars.ini,ex,$4) ) vcmp.msg $1 $2 This car does not exist/has not been found
    else if ( $4 !isnum ) vcmp.msg $1 $2 The id must be from numbers
    else if (( $readini(accounts.ini,$vcmp.name($1,$2),spawn) = 0 ) || ( !$readini(accounts.ini,$vcmp.name($1,$2),spawn) )) vcmp.msg $1 $2 Please Spawn first
    else if ( $readini(cars.ini,owner,$4) = $vcmp.name($1,$2) ) {
      vcmp.msg $1 $2 You have recived car , ID $chr(91) $4 $chr(93)
      vcmp.setvehicleloc $1 $4 $calc($vcmp.location($1,$2).x + 3 ) $vcmp.location($1,$2).y $vcmp.location($1,$2).z
    }
    else if ( $readini(cars.ini,share,$4) = $vcmp.name($1,$2) ) {
      vcmp.msg $1 $2 You have recived car , ID $chr(91) $4 $chr(93)
      vcmp.setvehicleloc $1 $4 $calc($vcmp.location($1,$2).x + 3 ) $vcmp.location($1,$2).y $vcmp.location($1,$2).z
    }
    else vcmp.msg $1 $2 You dont own this car
  }

if i do simple /c getcar [id] it returns only message but no car appears
else if i enter one time in car than do /c getcar [id] it appears car and message
so wtf ?!

14
mIRC/pawn Scripting / Re: help-par1
« on: December 16, 2011, 12:24:32 am »
anyways there was a problem with lvl.tointeger()

15
mIRC/pawn Scripting / help-par1
« on: December 15, 2011, 09:22:39 pm »
Code: [Select]
else if ( cmd == "setlevel")
{
local level = RFSLevel(player);
local lvl = GetTok(text, " ",2);
local plr = FindPlayer(GetTok(text, " ",1));
if ( level < 4 ) PrivMessage("You need at least level 4 to use this command",player);
else if ( !IsNum(lvl) ) PrivMessage("Level must be numbers",player);
else if (( lvl < 0 ) || ( lvl > 4 ) ) PrivMessage("Level must be from 1-4",player);
else if ( !plr ) PrivMessage("Invalid player",player);
else if ( !lvl ) PrivMessage("USE : /c setlevel [level]",player);
else
{
PrivMessage("You has setted "+plr+"'s level to "+lvl,player);
Message("**Admin "+player+" has seted "+plr+"'s level to "+lvl);
WriteIniInteger("Accounts.ini",plr.Name,"level",lvl.tointeger());
}
}

Pages: [1] 2