31.05.2014, 19:28
why this code won't work
pawn Код:
if(Target[killerid] == playerid) here target var is set to the hitman in givehit who's get to kill target
{
new nejm[2][MAX_PLAYER_NAME],string[128];
RPName(playerid,nejm[0]);
RPName(killerid,nejm[1]);
format(string,128,"Hitman %s is kill %s and collect %d$.",nejm[1],nejm[0],PlayerInfo[playerid][Contract]);
FamilyMessage(11,COLOR_ZUTA,string);
format(string,128,"|Hitman| %s is kill: %s",nejm[1],nejm[0]);
AdminMessage(BLUE,string);
MoneyPlus(killerid,PlayerInfo[playerid][Contract]);
PlayerInfo[playerid][Contract] = 0;
Target[killerid] = -1;
new query[128];
mysql_format(mysql,query,sizeof(query),"UPDATE `users` SET `Contract` = %d WHERE `ID` = '%s'",PlayerInfo[playerid][Contract],PlayerInfo[playerid][ID]);
mysql_tquery(mysql,query,"""");
}