Please Help !!
#1

Код:
 OnPlayerCommandReceived(playerid, cmdtext[])
{
	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, 0xFF0000FF, "Usage: /pm <id> <message>");
	        return 1;
	    }
	    if(!IsPlayerConnected(id)) return SendClientMessage(playerid, 0xFF0000FF, "ERROR: Player not connected");
	    if(playerid == id) return SendClientMessage(playerid, 0xFF0000FF, "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, 0xFF0000FF, str);
	        format(str, sizeof(str), "PM From %s(ID %d): %s", Name1, playerid, str2);
	        SendClientMessage(id, 0xFF0000FF, str);
	    }
	    return 1;
	}
Код:
 D:\Programs\New folder\GTA San Andreas\Gta servers\Drifting Venom\gamemodes\Drifting_Venoms.pwn(753) : warning 203: symbol is never used: "OnPlayerCommandReceived"
I don't get what to do, what do you suggest I do?
Reply
#2

You don't really need to use this.. Just remove it and leave the command.

EDIT: you forgot this at the end of
Quote:

SendClientMessage(playerid, 0xFF0000FF, "ERROR: You cannot pm yourself!")

Reply
#3

Okay, thanks...I'll try...
Reply
#4

OnPlayerCommandReceived is custom callback from ZCMD (maybe YCMD have it to)
So you just need to include your command system .inc file

Ex for ZCMD: #include <zcmd>
(You must have include in your pawn/includes folder)
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)