CMD problemita
#1

Can u check any something wrong ? ? ?

In that CMD...


Код:
new suspect;

CMD:bailfriend(playerid, params[])
{
    if(PlayerInfo[playerid][pArrested] = 1)
    {

		new string[128], giveplayerid, reason[64];
		if(sscanf(params, "us[64]", giveplayerid, reason)) return SendClientMessageEx(playerid, COLOR_WHITE, "USAGE: /bailfriend [playerid]");

		if(IsPlayerConnected(giveplayerid))
		{
			new year, month,day;
			getdate(year, month, day);
			format(string, sizeof(string), "AdmCmd: %s has been bailed from jail by %s", GetPlayerNameEx(giveplayerid), GetPlayerNameEx(playerid), month, day, year);
			Log("logs/bailfriend.log", string);
			format(string, sizeof(string), "AdmCmd: %s has been bailed from jail by %s", GetPlayerNameEx(giveplayerid), GetPlayerNameEx(playerid));
			WantedPoints[giveplayerid] = 0;
			PlayerInfo[suspect][pArrested] += 1;
			PlayerInfo[giveplayerid][pWantedLevel] = 0;
			PlayerInfo[giveplayerid][pBeingSentenced] = 0;
			SetPlayerToTeamColor(giveplayerid);
			SetPlayerWantedLevel(giveplayerid, 0);
			PlayerInfo[giveplayerid][pJailTime] = 0;
			SetPlayerPos(giveplayerid, 1529.6,-1691.2,13.3);
			SetPlayerInterior(giveplayerid,0);
			PlayerInfo[giveplayerid][pInt] = 0;
			SetPlayerVirtualWorld(giveplayerid, 0);
			PlayerInfo[giveplayerid][pVW] = 0;
			PlayerInfo[giveplayerid][pLocal] = 255;
			GivePlayerCash(playerid, -5000);
            SendClientMessageEx(playerid, TEAM_CYAN_COLOR, "You succed to bail for your friend, in 5,000$.");
		}
		else
		{
			SendClientMessageEx( playerid, COLOR_WHITE, "That Man/Woman is not underarrest." );
		}
	return 1;
}
Reply


Messages In This Thread
CMD problemita - by yaron0600 - 28.04.2013, 07:25
Re: CMD problemita - by [HK]Ryder[AN] - 28.04.2013, 07:37
Re: CMD problemita - by yaron0600 - 28.04.2013, 07:58
Re: CMD problemita - by MattyG - 28.04.2013, 08:52

Forum Jump:


Users browsing this thread: 1 Guest(s)