14.01.2014, 02:08
IMO stock is like a short form, i mean u can supress a code into a line or make a safe function and preventing hack.
for Example
u can use the above code to send a message to players other than the one u mentioned. Instead of typing
u can type
SendClientMessageToAllEx(playerid, -1, "~");
for Example
pawn Код:
stock SendClientMessageToAllEx(exception, color, const message[])
{
for(new i; i<MAX_PLAYERS; i++)
{
if(IsPlayerConnected(i))
{
if(i != exception)
{
SendClientMessage(i, color, message);
}
}
}
}
pawn Код:
for(new i; i<MAX_PLAYERS; i++)
{
if(IsPlayerConnected(i))
{
if(i !=playerid)
{
SendClientMessage(i, -1, "~");
}
}
}
SendClientMessageToAllEx(playerid, -1, "~");

