17.09.2009, 17:42
im using zcmd, but if i try typing /pm ingame itll say server: unknown command
Do i need more besides #include <zcmd>
Do i need more besides #include <zcmd>
pawn Код:
zcmd(pm, playerid, params[])
{
new id,text,str[128];
if (sscanf(params, "us", id,text)) ErrorMsg(playerid, "Use /pm [ID] [TEXT]");
else if (id == INVALID_PLAYER_ID) ErrorMsg(playerid, "Player not found!");
else
{
format(str, sizeof(str), "%s[%d]: %s",pName[playerid],playerid,text);
SendClientMessage(id, COLOR_PM, str);
format(str, sizeof(str), ">> %s[%d]: %s", pName[id], id, text);
SendClientMessage(playerid, COLOR_PM, str);
}
return 1;
}