Jump to content
  • 0

Modificare /rob


kentmore1

Question

Problema intalnita (descriere): Vreau să modific acest sistem de rob , am modificat la el să se poată da rob doar cu o persoană alături , dar tot nu merge
Ero(area / rile) / warning-(ul / urile):
Liniile de cod / sursa / script-ul(obligatoriu): 

CMD:robbank(playerid, params[])
{
	new robtype[12], string[32];
	if(gLogged[playerid] == 0) return SendClientMessage(playerid, COLOR_ERROR, "Tu nu esti logat si nu poti sa folosesti aceasta comanda!");
	if(GetPlayerState(playerid) != 2 || GetVehicleType(GetPlayerVehicleID(playerid)) != 1) return SendClientMessage(playerid, COLOR_ERROR, "You need to be driver of a car.");
	if(!IsPlayerInRangeOfPoint(playerid, 10.0, 1462.7577,-1022.5885,23.8281)) return SendClientMessage(playerid, COLOR_ERROR, "You need to be near bank.");
	if(IsACop(playerid)) return SendClientMessage(playerid, COLOR_ERROR, "You are a cop, you can't rob the bank.");
	if(PlayerInfo[playerid][pWanted] > 0) return SendClientMessage(playerid, COLOR_ERROR, "Ai deja un nivel de cautare ridicat, nu poti sa jefuiesti banca!");
	if(BankOccupied == 1) return SendClientMessage(playerid, COLOR_ERROR, "Exista deja un rob in desfasurare!");
	new robbers = 0, robbersn = 0;
 	foreach(new i : Player)
	{
		if(IsPlayerInVehicle(i, GetPlayerVehicleID(playerid)))
	 	if(PlayerInfo[i][pRob] == 10 && PlayerInfo[i][pLevel] > 4 && !IsACop(playerid)) robbers ++;
		else robbersn ++;
	}
	if(robbers < 4) return SendClientMessage(playerid, COLOR_ERROR, "You need to be minimum 4 players with level 5 or higher and 10 rob points.");
	if(robbersn > 0) return SendClientMessage(playerid, COLOR_ERROR, "You have a passenger who dosen't fulfill the rob requirements.");

	if(sscanf(params,"s[12]", robtype)) return SendClientMessage(playerid, COLOR_SYN, "Tasteaza:{FFFFFF} /robbank <Noisy / Silent>");
	{
        if(strmatch(robtype,"noisy"))
	    {
		TextDrawSetString(Rob3Text, "Rob Type: ~y~Noisy");
		TextDrawShowForPlayer(playerid, Rob1Text);
		TextDrawShowForPlayer(playerid, Rob2Text);
		TextDrawShowForPlayer(playerid, Rob3Text);
		RobLeader[playerid] = 1;
	    new randoms = random(sizeof(ROBCheck));
	    foreach(new i : Player)
	    {
		    if(IsPlayerInVehicle(i, GetPlayerVehicleID(playerid))) if(PlayerInfo[i][pRob] == 10 && PlayerInfo[i][pLevel] > 4)
		    {
                InterpolateCameraPos(i, 1424.183959, -1050.503417, 25.408981, 1442.854736, -1036.265747, 27.010061, 2500);
                InterpolateCameraLookAt(i, 1428.014038, -1047.335815, 25.953378, 1446.856079, -1033.275390, 27.227346, 2000);
				TextDrawShowForPlayer(i, Rob1Text);
				TextDrawShowForPlayer(i, Rob2Text);
				TextDrawShowForPlayer(i, Rob3Text);
		    	InRob[i] = 1;
		    	SetPlayerPos(i, ROBCheck[randoms][0], ROBCheck[randoms][1], ROBCheck[randoms][2]);
		    	TogglePlayerControllableEx(i, 0);
		        SetTimerEx("RobUnfreeze", 2000, 0, "i", i);
		    	SendClientMessage(i, COLOR_YELLOW, "* Liderul grupului trebuie sa planteze explozibilul pe usa seifului!");
		    	SendClientMessage(i, COLOR_YELLOW, "* In 30 secunde autoritatile vor fii anuntate, grabiti-va!");
		    	PlayerInfo[i][pRob] -= 10;
		    	Update(i, pRobx);

	    	}
    	}
	    UseFind[playerid] = 0;
	    IsTowing[playerid] = 0;
	    BankOccupied = 1;
	    RobSec = 30;
	    SetPlayerPos(playerid, 2942.8855,-1804.7043,1178.4606);
	    TogglePlayerControllableEx(playerid, 0);
		SetTimerEx("unfr", 1500, 0, "i", playerid);
		CP[playerid] = 200;
		format(string, sizeof(string), "Remaining Members: ~y~%d", GetRobbers() );
		TextDrawSetString(Rob1Text, string);
		SetPlayerCheckpoint(playerid, 2942.6709,-1783.2755,1178.5803, 2.0);
		RobFailTimer = SetTimerEx("FailedRob", 30000, 0, "d", playerid);
	}
	else if(strmatch(robtype,"silent"))
	{
		TextDrawSetString(Rob3Text, "Rob Type: ~y~Silent");
		TextDrawShowForPlayer(playerid, Rob1Text);
		TextDrawShowForPlayer(playerid, Rob2Text);
		TextDrawShowForPlayer(playerid, Rob3Text);
		RobLeader[playerid] = 2;
	    new randoms = random(sizeof(ROBCheck));
	    foreach(new i : Player)
	    {
		    if(IsPlayerInVehicle(i, GetPlayerVehicleID(playerid))) if(PlayerInfo[i][pRob] == 10 && PlayerInfo[i][pLevel] > 4)
		    {
                InterpolateCameraPos(i, 1424.183959, -1050.503417, 25.408981, 1442.854736, -1036.265747, 27.010061, 2500);
                InterpolateCameraLookAt(i, 1428.014038, -1047.335815, 25.953378, 1446.856079, -1033.275390, 27.227346, 2000);
				TextDrawShowForPlayer(i, Rob1Text);
				TextDrawShowForPlayer(i, Rob2Text);
				TextDrawShowForPlayer(i, Rob3Text);
		    	InRob[i] = 1;
		    	SetPlayerPos(i, ROBCheck[randoms][0], ROBCheck[randoms][1], ROBCheck[randoms][2]);
		    	TogglePlayerControllableEx(i, 0);
		        SetTimerEx("RobUnfreeze", 2000, 0, "i", i);
		    	SendClientMessage(i, COLOR_YELLOW, "* Unul dintre membrii grupului trebuie sa opreasca sistemul de securitate!");
		    	SendClientMessage(i, COLOR_YELLOW, "* In mai putin de un minut personalul bancii va fii aici, grabiti-va!");
		    	PlayerInfo[i][pRob] -= 10;
		    	Update(i, pRobx);

	    	}
    	}
	    UseFind[playerid] = 0;
	    IsTowing[playerid] = 0;
	    BankOccupied = 1;
	    RobSec = 60;
	    format(string, sizeof(string), "Remaining Members: ~y~%d", GetRobbers() );
		TextDrawSetString(Rob1Text, string);
		CreateBankObjects();
		RobFailTimer = SetTimerEx("SilentFailedRob", 60000, 0, "d", playerid);
	}
	}
	return 1;
}


Imagini / Video (optional):
Ati incercat sa rezolvati singur?: Nu reușesc ... am încercat de la 23:00 la 2:00 dimineața și nimic ...

 

Vreau să fie modificat să se poată da rob doar cu 2 persoane (eu și un amic) ... și dacă stau bine să mă gândesc trebuie cumva să fiți intr-un grup când dai rob ?!

Link to comment
Share on other sites

4 answers to this question

Recommended Posts

Guest
This topic is now closed to further replies.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. For more details you can also review our Terms of Use and Privacy Policy.