Do you know how to fixe that ? TSConnector
#1

Yo ! I've a two problem , one of these is I need to do the command twice to get the channelid and the other is the clientid who return 0 but i've not the clientid 0.
Can someone find one of these problems ?

Here it is my code
Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
	if (strcmp("/test", cmdtext, true, 10) == 0)
	{
	    for (new player = 0; player <= MAX_PLAYERS; player++)
		{
			new Float:x, Float:y, Float:z;
    		GetPlayerPos(playerid, x, y, z);
			if(IsPlayerInRangeOfPoint(player, 15.0, x, y, z))
			{
				new ip[16];
				GetPlayerIp(player,ip,sizeof(ip));
				//new clientid = TSC_GetClientIdByUid("SGGNj0J/0z8bQAD7TyyrRzY6I/g=");
    			        new clientid = TSC_GetClientIdByIpAddress(ip);
    			        new channel[19] = "Channel 9";
    			        TSC_CreateChannel(channel);
 				new string[64];
				new channelid = TSC_GetChannelIdByName(channel);
				format(string,sizeof(string),"Clientid = %i and channelid = %i and ip = %s and %s",clientid,channelid,ip,channel);
				SendClientMessage(playerid, -1,string);
				TSC_MoveClient(clientid, channelid);
				return 1;
    		         }
    	         }
		return 1;
	}
	return 0;
}
Thanks for the future help
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)