28.12.2014, 03:45
Just for players but if you want to use NPCs you must use the function ·IsPlayerNPC·
Example:
But if you want to do something with NPCs just use a restriction
Example:
pawn Код:
public OnPlayerUpdate(playerid)
{
SendClientMessage(playerid,-1,"Hello , this message will show each 1 second,");
// This will show only to the player
return true;
}
pawn Код:
public OnPlayerUpdate(playerid)
{
if(IsPlayerNPC(playerid))
{
// do something to NPCs
}
else
{
// do something to players
}
return true;
}