23.03.2011, 00:29
That's now how you properly create a cmd.
pawn Код:
CMD:vchat(playerid, params[])
{
new
pID,
pName[MAX_PLAYER_NAME],
iStr[128];
if(sscanf(params, "us[128]", pID, params)) return SendClientMessage(playerid, 0xFF9900AA, "USAGE: /vchat [text]"); // Assuming you are using sscanf2, if not change to: "us"
GetPlayerName(pID, pName, sizeof(pName));
format(iStr, sizeof(iStr), "[VIPCHAT] %s: %s", pName, params);
if(IsPlayerConnected(pID)) SendClientMessage(pID, 0xFF9900AA, iStr);
return 1;
}