it Will be nice if i got helped with this - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (
https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: it Will be nice if i got helped with this (
/showthread.php?tid=195135)
it Will be nice if i got helped with this -
Fool - 01.12.2010
Hello, i have this Sethit Command For Some Reason, i wont work Right, its The 'Money Problem', i tried to fix it alot i Just Got Errors or no Errors,
ok this is the command.
Код:
dcmd_Sethit(playerid,params[])
{
new
target, string[128], headamount;
if(PlayerInfo[playerid][IsHitman] == 1)
SendClientMessage(playerid,red,"Hitman Cant Put Hits On People. Fool");
if(PlayerInfo[playerid][IsCop] == 1)
return SendClientMessage(playerid,red,"Cops can't offer cash for kills!");
if(sscanf(params, "uz", target, headamount))
return SendClientMessage(playerid,red,"USAGE: /Sethit [Target ID] [Cash amount]");
if(target == playerid)
return SendClientMessage(playerid,red,"Silly Fool u cant Hit Ur Self.");
if(!IsPlayerConnected(target))
return SendClientMessage(playerid,red,"Invalid playerid or name!");
if(GetPlayerMoney(playerid) < headamount)
return SendClientMessage(playerid,red,"You can't afford that!");
if(headamount == 20000 || headamount == 1000001)
return SendClientMessage(playerid,COLOR_WHITE, "Min/Max hit contract amount is $20000 - $1000000");
else
{
PlayerInfo[target][HeadCash] = headamount;
SendClientMessage(playerid,COLOR_WHITE,"Hit has been set.");
for (new i=0; i<MAX_PLAYERS+1; i++)
{
if (IsPlayerConnected(i))
{
if(PlayerInfo[i][IsHitman] == 1)
{
format(string, sizeof(string), "%s(%d) put a Hit on %s(%d)'s kill him and get %s",PlayerName(playerid),playerid,PlayerName(target),target,headamount);
IRC_GroupSay(gGroupID,IRC_CHANNEL,string);
SendClientMessageToAll(COLOR_WHITE,string);
}
}
}
}
return true;
}
I Just need the money part to work.
Re: it Will be nice if i got helped with this -
Fool - 01.12.2010
Cant Someone Help me, i need really fast. Please.
Re: it Will be nice if i got helped with this -
Fool - 02.12.2010
Ive been waiting about 27 Hours, and still i didn't get help. Please, i need this.