25.02.2009, 13:28
Hey guys, i made a ransom command, but when i type like /ransom 0, it wont do anything.
Please help me!
Please help me!
pawn Код:
dcmd_ransom(playerid, params[])
{
new torelease;
torelease = strval(params);
if (!IsPlayerConnected(torelease))
{
SendClientMessage(COLOR_RED, playerid, "Player Is Not Connected Or Kidnapped!");
} else {
if(GetPlayerMoney(playerid) > PlayerRansom[torelease])
{
GivePlayerMoney(PlayerKidnapper[torelease], PlayerRansom[torelease]);
Kidnapped[torelease] = 0;
TogglePlayerControllable(torelease, 1);
} else {
SendClientMessage(COLOR_RED, playerid, "You Dont Have Enough Money To Pay His/Her Ransom!");
}
}
return 1;
}