Hitman - /gethit
#4

Nothing, I used /mycommand as an example. In your case it would be:

pawn Код:
if (strcmp("/gethit", cmdtext, true, 10) == 0)
So with that added to the script it would be:

pawn Код:
if (strcmp("/gethit", cmdtext, true, 10) == 0)
{
   if(PlayerInfo[playerid][pMember] == 8)
   {
   if(IsPlayerConnected(playerid))
   {
   new xd[MAX_PLAYER_NAME];
   new pid = GetRandomPlayer();
   new level = PlayerInfo[pid][pLevel];
   new pdclan = 500*IsACop(pid);
   if(IsPlayerInRangeOfPoint(playerid, 1000, 2809.1042,-1169.9015,1025.5703))
   {
   if(HitInfo[playerid][hitWaiter] == 0)
   {
   if(sscanf(params, "")) return GivePlayerMoney(playerid, 0);
   if(HitInfo[playerid][hitHit] == 0)
   {
   if(IsPlayerConnected(pid))
   {
   GetRandomPlayer();
   GetPlayerName(pid, xd, sizeof(xd));
   HitInfo[playerid][hitHit] = 1;
   hit[pid] = 1;
   HitInfo[playerid][hitWaiter] = 1;
   HitInfo[playerid][hitCijena] = level*100+pdclan;
   format(string, sizeof(string), "HITMAN AGENCY: Uspjesno ste dobili metu pod imenom %s - vrijednost mete: %d$.", xd, HitInfo[playerid][hitCijena]);
   SendClientMessage(playerid, COLOR_GOLD, string);
   SetTimerEx("HitTime", 180000, false, "%d", playerid);
   }
   }
   else
   {
   SendClientMessage(playerid, COLOR_LIGHTRED, "ERROR: Niste rijesili svoju metu te nemozete uzeti novu.");
   }
   }
   else
   {
   SendClientMessage(playerid, COLOR_LIGHTRED, "ERROR: Molimo vas da pricekate 3 minuta od proslog uzimanja mete da uzemete novu.");
   }
   }
   else
   {
   SendClientMessage(playerid, COLOR_LIGHTRED, "ERROR: Nemozete uzeti metu jer niste u bazi.");
   }
   }
   }
   else
   {
   SendClientMessage(playerid, COLOR_LIGHTRED, "ERROR: Niste u mogucnosti da koristite ovu komandu - samo clanovi Hitman Agencije.");
   }
   return 1;
}
Reply


Messages In This Thread
Hitman - /gethit - by Edin Black - 11.05.2012, 20:35
Re: Hitman - /gethit - by TheDominator - 11.05.2012, 20:37
Re: Hitman - /gethit - by Edin Black - 11.05.2012, 20:39
Re: Hitman - /gethit - by TheDominator - 11.05.2012, 20:41
Re: Hitman - /gethit - by Edin Black - 11.05.2012, 20:56
Re: Hitman - /gethit - by sniperwars - 11.05.2012, 20:58
Re: Hitman - /gethit - by Edin Black - 11.05.2012, 21:03

Forum Jump:


Users browsing this thread: