/Fakekill
#1

Код:
//-=-=-=-=-=-=-=-=-=-=-=-=-=-=[fakechat]-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
    if(strcmp(cmd, "/fakechat", true) == 0)
	{
        if(PlayerInfo[playerid][pAdmin] < 7) return DenyMessage(playerid, 7);
        new tmp3[256];
        tmp = strtok(cmdtext, idx);
        new faked = ReturnUser(tmp);
        tmp3 = strtok(cmdtext, idx);
       	new length = strlen(cmdtext);
       	new	id;
        cmd = strtok(cmdtext, id);
		while ((idx < length) && (cmdtext[idx] <= ' '))
		{
			idx++;
		}
		new offset = idx;
		new result[64];
		while ((idx < length) && ((idx - offset) < (sizeof(result) - 1)))
		{
			result[idx - offset] = cmdtext[idx];
			idx++;
		}
        if(!strlen(tmp)) return SendClientMessage(playerid, COLOR_WHITE, "USO: /fakechat [ID] [reason]");
		if(!strlen(tmp3)) return SendClientMessage(playerid, COLOR_WHITE, "USO: /fakechat [ID] [reason]");
	    if(IsPlayerConnected(faked) && IsPlayerConnected(faked))
		GetPlayerName(faked);
        SendPlayerMessageToAll(faked, (result));
		format((result),sizeof((result)),"%s[%d]: %s",faked,(result));
        SendClientMessage(playerid, COLOR_WHITE, "ID De jugador invalida.");
		return 1;
	}
Compila perfecto, pero cuando escribo el comando, aparece el nick del player con un espacio, sin mostrar el ID ni nada.
Saludos y gracias, ya me ayudaron bastante leyendo.
Reply


Messages In This Thread
/Fakechat - by Blackfuck - 22.10.2011, 16:11
Respuesta: /Fakekill - by [J]ulian - 22.10.2011, 16:26
Re: /Fakekill - by digman - 22.10.2011, 17:03
Respuesta: /Fakekill - by Blackfuck - 22.10.2011, 17:06
Re: /Fakekill - by digman - 22.10.2011, 17:08
Respuesta: Re: /Fakekill - by Blackfuck - 22.10.2011, 17:09
Re: /Fakekill - by digman - 22.10.2011, 17:27
Re: /Fakekill - by Blackfuck - 22.10.2011, 17:45
Re: /Fakekill - by digman - 22.10.2011, 17:48
Re: /Fakekill - by Blackfuck - 22.10.2011, 17:50

Forum Jump:


Users browsing this thread: 2 Guest(s)