11.08.2012, 19:46
Hello Connor.
Those will work!
Your /act a.k.a /do command is bugged because of /act and /me is using the exactly same code. You cannot make TWO commands with same texts. I didn't fix anything in your /act command. Just saying.
Those will work!
PHP код:
CMD:me(playerid, params[])
{
new
string[128],
action[100];
if(sscanf(params, "s[100]", action))
{
SendClientMessage(playerid, -1, "USAGE: /me [action]");
return 1;
}
else
{
format(string, sizeof(string), "* %s %s", GetName(playerid), action);
ProxDetector(30, playerid, string, 0xFF80FFC8);
}
return 1;
}
PHP код:
CMD:pm(playerid, params[])
{
new str[256], str2[256], id, Name1[MAX_PLAYER_NAME], Name2[MAX_PLAYER_NAME];
if(sscanf(params, "us", id, str2))
{
SendClientMessage(playerid, 0xFFFF00C8, "Usage: /pm <id> <message>");
return 1;
}
if(!IsPlayerConnected(id)) return SendClientMessage(playerid, 0xFFFF00C8, "ERROR: Player not connected");
if(playerid == id) return SendClientMessage(playerid, 0xFFFF00C8, "ERROR: You cannot pm yourself!");
{
GetPlayerName(playerid, Name1, sizeof(Name1));
GetPlayerName(id, Name2, sizeof(Name2));
format(str, sizeof(str), "PM To %s(ID %d): %s", Name2, id, str2);
SendClientMessage(playerid, 0xFFFF00C8, str);
format(str, sizeof(str), "PM From %s(ID %d): %s", Name1, playerid, str2);
SendClientMessage(id, 0xFFFF00C8, str);
}
return 1;
}
PHP код:
CMD:act(playerid, params[]) // BUGGED
{
new
string[128],
action[100];
if(sscanf(params, "s[100]", action))
{
SendClientMessage(playerid, -1, "USAGE: {FFFFFF}/act [action]");
return 1;
}
else
{
format(string, sizeof(string), "* %s %s.",(playerid), action);
ProxDetector(30, playerid, string, COLOR_PURPLE);
}
return 1;
}