[Include] NiteshBox
#1

//-----------------------------------------------------------------------------------------\\


__*!! NiteshBox !!*__

Introduction


This is my first release on sa-mp forums. Hope you like it.
This include is very simple. It make easier to you to create Connect message's in separate box, with only one single line of code required!
I made this for my own TDM server that I am developing, but I like to share, so here it is.


How to use it ?

First of all you need to Include the niteshbox
So for including paste this code almost above the script

Код:
#include <niteshbox>
Now
under OnGameModeInit

Код:
public OnGameModeInit()
{
    NiteshTextDrawInit();
    return 1;
}
Then under OnGameModeExit

Код:
public OnGameModeExit()
{
    NiteshTextDrawExit();
    return 1;
}
under OnPlayerConnect

Код:
public OnPlayerConnect(playerid)
{ 
    NiteshTextDrawConnect(playerid);
    return 1;
}
under OnPlayerDisconnect

Код:
public OnPlayerDisconnect(playerid)
{ 
    NiteshTextDrawDisconnect(playerid);
    return 1;
}
If you want to send a message then use SendNiteshMessage(playerid, string)


Example--------------------------------
public OnPlayerConnect(playerid)
{
new sstring[64], Name[MAX_PLAYER_NAME];
GetPlayerName(playerid,Name,MAX_PLAYER_NAME);
format(sstring,sizeof sstring,"%s(%d) has ~g~~h~joined ~w~the server",Name,playerid);
SendNiteshMessage(playerid,sstring);
return 1;
}

Screen Shot




DOWNLOAD


only one mirror

http://pastebin.com/8kSB0jaM


Installation

Just copy the text from http://pastebin.com/8kSB0jaM and paste in Notepad.
Now save it as niteshbox.inc
Now place it in include folder of pawn
And you are done.....

Credits


All the credits goes to
NVM aka Ironman aka Nitesh(me)

Bugs


Bug Free.!!!

Enjoy, and please report any bugs,if you found.


Thanks !!

//-----------------------------------------------------------------------------------------\\
Reply
#2

Can you add some images please?
Reply
#3

Why did you make it as include? You should make it as Filterscript. Anyonhow, not bad.
Reply
#4

Use ALS hooking so it would be easier to use.
Reply
#5

Quote:
Originally Posted by PT
Посмотреть сообщение
Can you add some images please?
Oops!! Sorry for that. Screen shot is added..

Quote:
Originally Posted by SeniorGamer
Посмотреть сообщение
Why did you make it as include? You should make it as Filterscript. Anyonhow, not bad.
It's easy to me to make it as include.

Quote:
Originally Posted by kvann
Посмотреть сообщение
Use ALS hooking so it would be easier to use.
Thanks for advice.
But I don't know much about it.
Reply
#6

any comments?
Reply
#7

pretty simple, but still +3 reps. Keep it up.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)