Vice City Multiplayer

VC:MP 0.3 => mIRC/pawn Scripting => Topic started by: Fuzzy168 on July 07, 2011, 04:05:34 pm

Title: Pawn Script Help
Post by: Fuzzy168 on July 07, 2011, 04:05:34 pm
[pawn]#include <a_vcmp>
#include <core>
#include <float>

static szGameModeName[128] = "DMW [r1.1a]";
static szGameModeAuthorName[128] = "Fuzzy168";

#define COLOR_GREY 0xAFAFAFAA
#define COLOR_GREEN 0x33AA33AA
#define COLOR_RED 0xAA3333AA
#define COLOR_YELLOW 0xFFFF00AA
#define COLOR_WHITE 0xFFFFFFAA
#define INACTIVE_PLAYER_ID 255



#define MAX_WEAPONS 61
new wep_init = 0;
new gWeapons[MAX_WEAPONS][64];
new gPlayers[MAX_PLAYERS][MAX_PLAYER_NAME+1];

#define PI  3.1415926535897932384626433832795[/pawn]VC:MP Mode

Could you tell me what are the following features for?

1.[pawn]#include <float>[/pawn] I tried #include <dini> it gives me error
2.[pawn]#define USERS_FILE          "/Users/%s.ini"
#define REPORTS_FILE        "/Reports/%s.ini"
#define BANS_FILE           "/Users/%s.ini"
#define Pickups             "/Pickups/Pickups.ini"
#define VEHICLEOWNERS_FILE  "/Vehicles/owners.ini"
#define MAX_PASS_SIZE       16
#define MIN_PASS_SIZE       2
#define LOGIN_ATTEMPTS      3
#define CountDownn      3[/pawn]How to add this kind of feature
3.[pawn]enum pInfo
{
   Password[MAX_PASS_SIZE+1],
   Logged,
   Level,
   Skinid,
   Stats,
   NoGoto,
   NoLoc,
   ClientVersion,
   Spawned,
   Warns,
   FalseLogins
}

enum sInfo
{
   Countx,
   Echo,
   Drownforhelikill,
   Drownfordriveby
}[/pawn]What are enum for?
4.[pawn]#define MAX_WEAPONS 61
new wep_init = 0;
new gWeapons[MAX_WEAPONS][64];
new gPlayers[MAX_PLAYERS][MAX_PLAYER_NAME+1];

#define PI  3.1415926535897932384626433832795[/pawn]What is this?
Title: Re: Pawn Script Help
Post by: BIG[H] on July 08, 2011, 07:55:24 am
PAWN!!!!!!!!!!!!!!! >.<

well i am lazy to tell you all.....
but # 4

Its Globle variable that can be used in any public function or command
its Saves Player info
well i make a Globle Variable for player money / Cash in top of script where #define static are
new PlayerCash[MAX_PLAYERS][Cash];
ok lets apply it on cmd's
here we go!
like
@ cmd !givemecash
PlayerCash[player][Cash] + 100;

and

@cmd !cash

if(PlayerCash[player][Cash] == 0) ClientMsg(player,COLOR,"You don't got any cash :D"): // well :D sign is not troll face exactly

else {
new xmsg[45];
format(xmsg,45,"your Cash is $ %d",PlayerCash[player][Cash]);
return ClientMSG(player,COLOR,xmsg);
}

//it will return cash amount that was in PlayerCash[player][Cash] meaning is that you can use it where ever u can , no need to create it for every cmd like new PlayerCash etc

just be Happy i can tell as much i can ,i eventually forgot 80% of pawn due to Squirrel Language , Squirrel is most easiest language , well you should try squirrel at least i was thinking to make a squirrel Tutorial when i will be free :D

Greetings Trafford

 
Title: Re: Pawn Script Help
Post by: Fuzzy168 on July 27, 2011, 04:40:40 pm
How about the others?