Vice City Multiplayer
VC:MP 0.3 => mIRC/pawn Scripting => Topic started by: Fuzzy168 on July 27, 2011, 04:31:53 pm
-
I found this with some functions that i think could help me. Anyone wanna tell me how this function works?
-
INC means an include which contains inbuilt scripts on the file.no need to script it on the pawn file just include the file on the pawn file 8)
Example:
Create a Notepad save the file as Justinbieber.inc and paste it on pawno>include
Add these scripts on Justinbieber.inc and save it:
[pawn]stock IsNumber(const string[])
{
new length=strlen(string);
if (length==0) return false;
for (new i = 0; i < length; i++)
{
if (
(string > '9' || string < '0' && string!='-' && string!='+')
|| (string=='-' && i!=0)
|| (string=='+' && i!=0)
) return false;
}
if (length==1 && (string[0]=='-' || string[0]=='+')) return false;
return true;
}[/pawn]
and on pawn script add [pawn] #include <Justinbieber>[/pawn]
now use it without adding this function on your pawn script
Hope it helped!!
-
err.. i was asking what is the use of file.inc..
-
err.. i was asking what is the use of file.inc..
Oh my God OK here's a quick refer definition for it:
No need to script special functions on the pawn file just add it on INC file and include it on the pawn file and you dont get errors while compiling..
so, you want a [PDF] file format package with included Video in it ah? :o
-
I was meaning the function of file.inc.. how do i use the function in the file.inc?
-
INC means an include which contains inbuilt scripts on the file.no need to script it on the pawn file just include the file on the pawn file 8)
Example:
Create a Notepad save the file as Justinbieber.inc and paste it on pawno>include
Add these scripts on Justinbieber.inc and save it:
[pawn]stock IsNumber(const string[])
{
new length=strlen(string);
if (length==0) return false;
for (new i = 0; i < length; i++)
{
if (
(string > '9' || string < '0' && string!='-' && string!='+')
|| (string=='-' && i!=0)
|| (string=='+' && i!=0)
) return false;
}
if (length==1 && (string[0]=='-' || string[0]=='+')) return false;
return true;
}[/pawn]
and on pawn script add [pawn] #include <Justinbieber>[/pawn]
now use it without adding this function on your pawn script
Hope it helped!!
Holy Crap.. do you use this?
meh.. lag
use this
[pawn]IsNum(const string[])
{// mike's function
for (new i = 0, j = strlen(string); i < j; i++) { if (string > '9' || string < '0') return 0; }
return 1;
}[/pawn]