No me funciona el comando
#1

Hola, el comando no funciona, me tira error que no soy ladrуn pero si tengo el job.
Y si quito esa excepciуn no hace ninguna funciуn (ni da errores)

Код:
	CMD:robarpersona(playerid, params[])
	{
	if(Info[playerid][pJob] == 17 || Info[playerid][pJob2] == 17) return SendClientMessageEx(playerid, ERROR, "No eres ladrуn.");
        {
		    if(!sscanf(params, "s[32]", params[0]))
		    {
		        new string[128];
		            new victim = GetClosestPlayer(playerid);
		            if(ProxDetectorS(2.0,playerid, victim))
		            {
                        if(GetPlayerWeapon(victim) == 41)
		    			{
	        				format(string, sizeof(string), "%s intenta robarle a %s sin que se de cuenta y falla", GetPlayerNameEx(playerid), GetPlayerNameEx(victim));
							ProxDetector(30.0, playerid, string, COLOR_RED,COLOR_RED,COLOR_RED,COLOR_RED,COLOR_RED);
       						format(string, sizeof(string), "* %s le rocнa la cara con un spray anti-ladrones a %s.", GetPlayerNameEx(victim), GetPlayerNameEx(playerid));
							ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
							SendClientMessageEx(params[0], COLOR_YELLOW2, "-> ЎEvitaste que te robaran!");
					    }
					    new rob = random(2)+1;
					    if(rob == 1)
					    {
                           GivePlayerCash(params[0], -575);
					        format(string, sizeof(string), "%s intenta robarle a %s sin que se de cuenta y lo logra", GetPlayerNameEx(playerid) ,GetPlayerNameEx(params[0]));
							ProxDetector(30.0, playerid, string, COLOR_GREEN,COLOR_GREEN,COLOR_GREEN,COLOR_GREEN,COLOR_GREEN);
       						format(string, sizeof(string), "* %s se acerca hacia %s y le roba su telйfono.", GetPlayerNameEx(playerid) ,GetPlayerNameEx(params[0]));
							ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
							SendClientMessageEx(params[0], COLOR_YELLOW2, "ЎTe han robado dinero!");
							SendClientMessageEx(playerid, COLOR_YELLOW2, "ЎHas robado dinero!");
							 GivePlayerCash(playerid, 575);
						}
						else
						{
      						format(string, sizeof(string), "%s intenta robarle a %s sin que se de cuenta y falla", GetPlayerNameEx(playerid), GetPlayerNameEx(params[0]));
							ProxDetector(30.0, playerid, string, COLOR_RED,COLOR_RED,COLOR_RED,COLOR_RED,COLOR_RED);
       						format(string, sizeof(string), "* %s se da cuenta y le da un golpe de puсo a %s.", GetPlayerNameEx(params[0]), GetPlayerNameEx(playerid));
							ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
							SendClientMessageEx(params[0], COLOR_GENERAL, "Has evitado que te roben.");
							SendClientMessageEx(playerid, COLOR_YELLOW, "La persona que le intentaste robar te descubriу, ЎCorre!");
						}
		            }
				 }
			  }
		        return 1;
	  }
Reply


Messages In This Thread
No me funciona el comando - by Nicosm - 05.06.2017, 04:11
Respuesta: No me funciona el comando - by mcreed - 10.06.2017, 22:12

Forum Jump:


Users browsing this thread: 1 Guest(s)