SA-MP Forums Archive
include help - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: include help (/showthread.php?tid=396656)



include help - MarkzD - 01.12.2012

so i create an include, him code:
PHP код:
#include <a_samp>
/*
native pn(playerid);
native pm(playerid);
native interior(playerid, interiorid);
native scm(playerid, color, const message[]);
*/
stock pn(playerid)
{
    new 
pn[MAX_PLAYER_NAME];
    
GetPlayerName(playerid,pn,sizeof(pn));
    return 
pn;
}
stock pm(playerid)
{
    new 
pm GetPlayerMoney(playerid);
    return 
pm;
}
stock interior(playeridinteriorid)
{
    
SetPlayerInterior(playeridinteriorid);
    return 
1;
}
stock scm(playeridcolor, const message[])
{
    
SendClientMessage(playeridcolor, const message[]);
    return 
1;

Exapmle:
when i write to my mode
PHP код:
scm(playerid,0xFFFFFFFF,"asdsaddsaddas"); 
I see that errors:
PHP код:
C:\Users\&#196;èìà\Desktop\USWW\pawno\include\mfunc.inc(30) : error 029: invalid expression, assumed zero
C:\Users\&#196;èìà\Desktop\USWW\pawno\include\mfunc.inc(30) : error 029: invalid expression, assumed zero
C:\Users\&#196;èìà\Desktop\USWW\pawno\include\mfunc.inc(30) : error 029: invalid expression, assumed zero
C:\Users\&#196;èìà\Desktop\USWW\pawno\include\mfunc.inc(30) : fatal error 107: too many error messages on one line 
wtf?


Re: include help - Lordzy - 01.12.2012

Try this stock
pawn Код:
stock scm(playerid, color, text[])
{
 return SendClientMessage(playerid, color, text);
}
//Or you can use it through defines
#define scm(%0,%1,%2) SendClientMessage(%0,%1,%2)
.


Re: include help - zSuYaNw - 01.12.2012

Quote:
Originally Posted by Lordz™
Посмотреть сообщение
Try this stock
pawn Код:
stock scm(playerid, color, text[])
{
 return SendClientMessage(playerid, color, text);
}
//Or you can use it through defines
#define scm(%0,%1,%2) SendClientMessage(%0,%1,%2)
.
Or:

pawn Код:
#define scm SendClientMessage



Re: include help - MarkzD - 01.12.2012

tnhx