Ayuda con un comando
#5

Bueno , coloca lo siguiente:
Код:
	if(strcmp(cmd, "/jail", true) == 0)
	{
	  if(IsPlayerConnected(playerid))
	  {

			tmp = strtok(cmdtext, idx);
			if(!strlen(tmp))
			{
				SendClientMessage(playerid, COLOR_GRAD2, "ZoneRol RP: /jail [ Nombre ] [ Tiempo (Minutos) ] [ Razon ]");
				return 1;
			}
			new playa;
			new length = strlen(cmdtext);
			new money;
			playa = ReturnUser(tmp);
			tmp = strtok(cmdtext, idx);
			money = strval(tmp);
			new offset = idx;
			new result[64];
			while ((idx < length) && ((idx - offset) < (sizeof(result) - 1)))
			{
				result[idx - offset] = cmdtext[idx];
				idx++;
			}
			result[idx - offset] = EOS;
			if(!strlen(result))
			{
				SendClientMessage(playerid, COLOR_GRAD2, "ZoneRol RP: /jail [ Nombre ] [ Tiempo (Minutos) ] [ Razon ]");
				return 1;
			}
			if (PlayerInfo[playerid][pAdmin] >= 1)
			{
			  if(IsPlayerConnected(playa))
			  {
			    if(playa != INVALID_PLAYER_ID)
			    {
				    GetPlayerName(playa, giveplayer, sizeof(giveplayer));
						GetPlayerName(playerid, sendername, sizeof(sendername));
						format(string, sizeof(string), "ZoneRol RP: Jaileaste a %s. Razon: %s", giveplayer, (result));
						SendClientMessage(playerid, COLOR_LIGHTRED, string);
						format(string, sizeof(string), "Administracion ZoneRol:");
						SendClientMessage(playa, COLOR_LIGHTRED, string);
						format(string, sizeof(string), "Administracion: %s fue jaileado %d minutos por %s , Razon:%s", giveplayer, money ,sendername,(result));
						SendClientMessageToAll(COLOR_LIGHTRED,string);
						ResetPlayerWeapons(playa);
						WantedPoints[playa] = 0;
						PlayerInfo[playa][pJailed] = 1;
						PlayerInfo[playa][pJailTime] = money*60;
						SetPlayerInterior(playa, 6);
						SetPlayerPos(playa, 264.6288,77.5742,1001.0391);
						format(string, sizeof(string), "Fuiste jaileado %d minutos por %s - Razon: %s", money , sendername ,(result));
						SendClientMessage(playa, COLOR_LIGHTBLUE, string);
					}
				}
			}
			else
			{
				SendClientMessage(playerid, COLOR_GRAD1, "Usted no esta autorizado para usar este comando!");
			}
		}
		return 1;
	}
Reply


Messages In This Thread
Ayuda con un comando - by Roymer - 18.04.2010, 19:12
Re: Ayuda con un comando - by Earth - 18.04.2010, 20:07
Re: Ayuda con un comando - by [SRG]Toxic_Racer - 18.04.2010, 20:16
Re: Ayuda con un comando - by Roymer - 18.04.2010, 21:19
Re: Ayuda con un comando - by Nacho350 - 22.04.2010, 17:54
Re: Ayuda con un comando - by Miguel - 22.04.2010, 18:14
Re: Ayuda con un comando - by ValenTiiN - 22.04.2010, 18:23
Re: Ayuda con un comando - by Cesar_Biker - 22.04.2010, 19:35

Forum Jump:


Users browsing this thread: 1 Guest(s)