help me !
#1

Код:
	if(strcmp(cmd,"/regp",true) == 0)
	{
		tmp = strtok(cmdtext,idx);
	  if(IsPlayerConnected(playerid))
	  {
	    if(PlayerData[playerid][AdminLevel] >= 3)
			{
				new length = strlen(cmdtext);
				while ((idx < length) && (cmdtext[idx] <= ' '))
				{
					idx++;
				}
				new offset = idx;
				new result[128];
				while ((idx < length) && ((idx - offset) < (sizeof(result) - 1)))
				{
					result[idx - offset] = cmdtext[idx];
					idx++;
				}
				result[idx - offset] = EOS;
	  			if(!strlen(tmp))
 				{
					SendClientMessage(playerid, 0xE6E6E6E6, "SERVER: /regp [password] [name]");
				}
				else
{

					}
					else
					{
						format(string, sizeof(string), "SERVER: %s is already registered.", result);
						SendClientMessage(playerid, 0x9ACD32AA, string);
					}
				}
			}
		}
		else
		{
			format(string, sizeof(string), "SERVER: You are not connected, or you are not an admin !");
			SendClientMessage(playerid, 0xE6E6E6E6, string);
		}
		return 1;
	}
Reply
#2

i want to do this , infront of /regp pass name ,
to do /regp name pass .
its something in strtok .
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)