[pomoc]Ar komanda


Započeo Arnel_Bp, Jun 14, 2014, 16:32:49 POSLE PODNE

prethodna tema - sledeća tema

0 članova i 1 gost pregledaju ovu temu.

Skripta koju koristim: moja od 0
Detaljan opis problema: problem je u tome sto komanda radi, ali ako sam policajac ili TEAM_BOUNTY kad kucam /ar id onda izbacuje mi duplu poruku, sve ovo... ako me shvatate, mozeli ko ovo da mi ispravi... znaci pokazuje mi poruku i za cop i za team bountly pa ako moze neko ovo da mi vidi, hvala unaprijed..
Dio skripte:
CMD:ar(playerid, params[])
{
	if(Ulogiran[playerid] == 0) return SendClientMessage(playerid, 0xFF0000FF, "Moras se spawnati da bi mogao da koristis ovu komandu");
   	if(gTeam[playerid] == TEAM_FBI || gTeam[playerid] == TEAM_ARMY || gTeam[playerid] == TEAM_COP || gTeam[playerid] == TEAM_BOUNTY)
   	{
	new id,string[126];
	if(sscanf(params, "ui", id)) return SCM(playerid, 0xFF0000FF, "Koristi: /ar [id]");
	if(!IsPlayerConnected(id)) return SCM(playerid, 0xFF0000FF, "ID igraca koji ste unijeli nije online.");
 	if(IsPlayerInAnyVehicle(id)) return SCMF(playerid, 0xFF0000FF, "Igrac %s(%d) je u vozilu i nemozes njega uhapsiti. Probaj ga navuci da izadje iz vozila ili pucaj u vozilo",GetName(id),id);
 	if(IsPlayerInAnyVehicle(playerid)) return SCMF(playerid, 0xFF0000FF, "Ne mozes uhapsiti %s(%d) jer si u vozilu, napusti vozilo i pokusaj opet uhapsiti nekoga",GetName(id),id);
 	if(GetDistanceBetweenPlayers(playerid,id) > 4) return SCMF(playerid, 0xFF0000FF, "Igrac %s(%d) je suvise daleko od tebe, probaj mu se pribliziti",GetName(id),id);
    if(Ulogiran[id] == 0) return SCMF(playerid,  0xFF0000FF, "Igrac %s(%d) je mrtav, nemozes uhapsiti njega",GetName(id),id);
    if(Jailed[playerid] ==1) return SCMF(playerid,  0xFF0000FF, "Igrac %s(%d) je vec u zatvoru...",GetName(id),id);
	if(gTeam[playerid] == TEAM_BOUNTY && EscapedConvict[id] == 1 && GetPlayerWantedLevel(id) >=10)
  	SetPlayerInterior(id,10);
    new rnd;
    rnd = random(sizeof (AlcatrazArrestedSpawn));
    SetPlayerPos(id, AlcatrazArrestedSpawn[rnd][0], AlcatrazArrestedSpawn[rnd][1], AlcatrazArrestedSpawn[rnd][2]);
    SetPlayerFacingAngle(id, AlcatrazArrestedSpawn[rnd][3]);
   	new oname[24];
    new pname[24];
    GetPlayerName(playerid,oname, 24);
	GetPlayerName(id, pname, 24);
    format(string, sizeof(string), "Bounty Hunter %s(%d) has re-captured Escaped Convict %s(%d) and has sent the suspect to Alcatraz",oname,playerid,pname,id);
    SendClientMessageToAll(0x00C7FFAA, string);
    SendClientMessage(id, 0xA9A9A9AA, "|_You Have Been Busted By A Bounty Hunter_|");
    format(string, sizeof(string), "You have been sent to Alcatraz by Bounty Hunter %s(%d)",oname,playerid);
    SendClientMessage(id,0x00C7FFAA, string);
    SendClientMessage(id,0x00C7FFAA,"You will be auto-released from Alcatraz once you have served your sentence");
    SendClientMessage(id,0x00C7FFAA,"If Alcatraz life sucks for you... Why not ask a friend to visit you? /reqvisit (id)");
    SendClientMessage(playerid, 0xA9A9A9AA, "|_Suspect Arrested_|");
    format(string, sizeof(string), "You have sent escaped prisoner %s(%d) to Alcatraz - you receive a $5000 re-capture bonus",pname,id);
    SendClientMessage(playerid,0x00C7FFAA, string);
    GameTextForPlayer(playerid,"~b~Suspect Arrested",5000,3);
    format(string, sizeof(string), "Escaped Convict %s(%d) has been re-arrested and sent to Alcatraz by Bounty Hunter %s(%d)",pname,id,oname,playerid);
    printf("%s", string);
    SendClientMessage(id,0xFF7F50AA,"If you leave the server while you are in jail you WILL be banned");
    GivePlayerMoney(playerid,5000);
	Jailed[id] =1;
	InAlcatraz[id] =1;
	triedtoescaperecent[id] =1;
	ResetPlayerWeapons(id);
	JailTime[id] =320;
	JailTimeServed[id] =0;
	EscapedConvict[id] =0;
	SetPlayerWantedLevel(id,0);
	oscore = GetPlayerScore(playerid);
   	SetPlayerScore(playerid, oscore +1);
    if(EscapedConvict[id] == 1 && GetPlayerWantedLevel(id) >=10)
    SetPlayerInterior(id,10);
    rnd = random(sizeof (AlcatrazArrestedSpawn));
    SetPlayerPos(id, AlcatrazArrestedSpawn[rnd][0], AlcatrazArrestedSpawn[rnd][1], AlcatrazArrestedSpawn[rnd][2]);
    SetPlayerFacingAngle(id, AlcatrazArrestedSpawn[rnd][3]);
    format(string, sizeof(string), "Escaped Convict %s(%d) has been re-arrested and sent to Alcatraz by Officer %s(%d) ",pname,id,oname,playerid);
    SendClientMessageToAll(0x00C7FFAA, string);

    SendClientMessage(id, 0xA9A9A9AA, "|_You Have Been Arrested_|");
    format(string, sizeof(string), "You have been sent to Alcatraz by Officer %s(%d)",oname,playerid);
    SendClientMessage(id,0x00C7FFAA, string);
    SendClientMessage(id,0x00C7FFAA,"You will be auto-released from Alcatraz once you have served your sentence");
    SendClientMessage(id,0x00C7FFAA,"If Alcatraz life sucks for you... Why not ask a friend to visit you? /reqvisit (id)");
    SendClientMessage(playerid, 0xA9A9A9AA, "|_Suspect Arrested_|");
    format(string, sizeof(string), "You have sent escaped prisoner %s(%d) to Alcatraz - you receive a $4000 re-capture bonus",pname,id);
    SendClientMessage(playerid,0x00C7FFAA, string);
    GameTextForPlayer(playerid,"~b~Suspect Arrested",5000,3);
    format(string, sizeof(string), "Escaped Convict %s(%d) has been re-arrested and sent to Alcatraz by Officer %s(%d)",pname,id,oname,playerid);
    printf("%s", string);
    SendClientMessage(id,0xFF7F50AA,"If you leave the server while you are in jail you WILL be banned");
    GivePlayerMoney(playerid,4000);
	Jailed[id] =1;
	InAlcatraz[id] =1;
	triedtoescaperecent[id] =1;
	ResetPlayerWeapons(id);
	JailTime[id] =320;
	JailTimeServed[id] =0;
	EscapedConvict[id] =0;
	SetPlayerWantedLevel(id,0);
	oscore = GetPlayerScore(playerid);
   	SetPlayerScore(playerid, oscore +1);
	}
	else return SendClientMessage(playerid, 0xFF0000FF, "Ova komanda je namijenjena za oficire San Andreasa.Nisi ovlascen da koristis ovu komandu.");
	return 1;
}

Neke slike/video za lakse dobivanje pomoci(neobavezno):

jao bre kolika komanda...
pa proveris da li je id uhvatio jedan ili drugi tim i na osnovu tog saljes mu poruku
69

Citat: [SF]C++ poslato Jun 14, 2014, 16:35:46 POSLE PODNE
jao bre kolika komanda...
pa proveris da li je id uhvatio jedan ili drugi tim i na osnovu tog saljes mu poruku

Pa mozes li mi to uradit/ispravit

Ja nisam ovde da radim neko da pomognem reko sam ti sve ukljuci malo mozdane vijuge,nikad neces naucit ako drugi radi.
69

nesto sam probo da ispravim ovako ali ne ide...

CMD:ar(playerid, params[])
{
	if(Ulogiran[playerid] == 0) return SendClientMessage(playerid, 0xFF0000FF, "Moras se spawnati da bi mogao da koristis ovu komandu");
   	if(gTeam[playerid] == TEAM_FBI || gTeam[playerid] == TEAM_ARMY || gTeam[playerid] == TEAM_COP || gTeam[playerid] == TEAM_BOUNTY)
   	{
	new id,string[126];
	if(sscanf(params, "ui", id)) return SCM(playerid, 0xFF0000FF, "Koristi: /ar [id]");
	if(!IsPlayerConnected(id)) return SCM(playerid, 0xFF0000FF, "ID igraca koji ste unijeli nije online.");
 	if(IsPlayerInAnyVehicle(id)) return SCMF(playerid, 0xFF0000FF, "Igrac %s(%d) je u vozilu i nemozes njega uhapsiti. Probaj ga navuci da izadje iz vozila ili pucaj u vozilo",GetName(id),id);
 	if(IsPlayerInAnyVehicle(playerid)) return SCMF(playerid, 0xFF0000FF, "Ne mozes uhapsiti %s(%d) jer si u vozilu, napusti vozilo i pokusaj opet uhapsiti nekoga",GetName(id),id);
 	if(GetDistanceBetweenPlayers(playerid,id) > 4) return SCMF(playerid, 0xFF0000FF, "Igrac %s(%d) je suvise daleko od tebe, probaj mu se pribliziti",GetName(id),id);
    if(Ulogiran[id] == 0) return SCMF(playerid,  0xFF0000FF, "Igrac %s(%d) je mrtav, nemozes uhapsiti njega",GetName(id),id);
    if(Jailed[playerid] ==1) return SCMF(playerid,  0xFF0000FF, "Igrac %s(%d) je vec u zatvoru...",GetName(id),id);
	if(gTeam[playerid] == TEAM_BOUNTY && EscapedConvict[id] == 1 && GetPlayerWantedLevel(id) >=10)
	{
  	SetPlayerInterior(id,10);
    new rnd;
    rnd = random(sizeof (AlcatrazArrestedSpawn));
    SetPlayerPos(id, AlcatrazArrestedSpawn[rnd][0], AlcatrazArrestedSpawn[rnd][1], AlcatrazArrestedSpawn[rnd][2]);
    SetPlayerFacingAngle(id, AlcatrazArrestedSpawn[rnd][3]);
   	new oname[24];
    new pname[24];
    GetPlayerName(playerid,oname, 24);
	GetPlayerName(id, pname, 24);
    format(string, sizeof(string), "Bounty Hunter %s(%d) has re-captured Escaped Convict %s(%d) and has sent the suspect to Alcatraz",oname,playerid,pname,id);
    SendClientMessageToAll(0x00C7FFAA, string);
    SendClientMessage(id, 0xA9A9A9AA, "|_You Have Been Busted By A Bounty Hunter_|");
    format(string, sizeof(string), "You have been sent to Alcatraz by Bounty Hunter %s(%d)",oname,playerid);
    SendClientMessage(id,0x00C7FFAA, string);
    SendClientMessage(id,0x00C7FFAA,"You will be auto-released from Alcatraz once you have served your sentence");
    SendClientMessage(id,0x00C7FFAA,"If Alcatraz life sucks for you... Why not ask a friend to visit you? /reqvisit (id)");
    SendClientMessage(playerid, 0xA9A9A9AA, "|_Suspect Arrested_|");
    format(string, sizeof(string), "You have sent escaped prisoner %s(%d) to Alcatraz - you receive a $5000 re-capture bonus",pname,id);
    SendClientMessage(playerid,0x00C7FFAA, string);
    GameTextForPlayer(playerid,"~b~Suspect Arrested",5000,3);
    format(string, sizeof(string), "Escaped Convict %s(%d) has been re-arrested and sent to Alcatraz by Bounty Hunter %s(%d)",pname,id,oname,playerid);
    printf("%s", string);
    SendClientMessage(id,0xFF7F50AA,"If you leave the server while you are in jail you WILL be banned");
    GivePlayerMoney(playerid,5000);
	Jailed[id] =1;
	InAlcatraz[id] =1;
	triedtoescaperecent[id] =1;
	ResetPlayerWeapons(id);
	JailTime[id] =320;
	JailTimeServed[id] =0;
	EscapedConvict[id] =0;
	SetPlayerWantedLevel(id,0);
	oscore = GetPlayerScore(playerid);
   	SetPlayerScore(playerid, oscore +1);
    if(EscapedConvict[id] == 1 && GetPlayerWantedLevel(id) >=10)
    {
    SetPlayerInterior(id,10);
    rnd = random(sizeof (AlcatrazArrestedSpawn));
    SetPlayerPos(id, AlcatrazArrestedSpawn[rnd][0], AlcatrazArrestedSpawn[rnd][1], AlcatrazArrestedSpawn[rnd][2]);
    SetPlayerFacingAngle(id, AlcatrazArrestedSpawn[rnd][3]);
    format(string, sizeof(string), "Escaped Convict %s(%d) has been re-arrested and sent to Alcatraz by Officer %s(%d) ",pname,id,oname,playerid);
    SendClientMessageToAll(0x00C7FFAA, string);

    SendClientMessage(id, 0xA9A9A9AA, "|_You Have Been Arrested_|");
    format(string, sizeof(string), "You have been sent to Alcatraz by Officer %s(%d)",oname,playerid);
    SendClientMessage(id,0x00C7FFAA, string);
    SendClientMessage(id,0x00C7FFAA,"You will be auto-released from Alcatraz once you have served your sentence");
    SendClientMessage(id,0x00C7FFAA,"If Alcatraz life sucks for you... Why not ask a friend to visit you? /reqvisit (id)");
    SendClientMessage(playerid, 0xA9A9A9AA, "|_Suspect Arrested_|");
    format(string, sizeof(string), "You have sent escaped prisoner %s(%d) to Alcatraz - you receive a $4000 re-capture bonus",pname,id);
    SendClientMessage(playerid,0x00C7FFAA, string);
    GameTextForPlayer(playerid,"~b~Suspect Arrested",5000,3);
    format(string, sizeof(string), "Escaped Convict %s(%d) has been re-arrested and sent to Alcatraz by Officer %s(%d)",pname,id,oname,playerid);
    printf("%s", string);
    SendClientMessage(id,0xFF7F50AA,"If you leave the server while you are in jail you WILL be banned");
    GivePlayerMoney(playerid,4000);
	Jailed[id] =1;
	InAlcatraz[id] =1;
	triedtoescaperecent[id] =1;
	ResetPlayerWeapons(id);
	JailTime[id] =320;
	JailTimeServed[id] =0;
	EscapedConvict[id] =0;
	SetPlayerWantedLevel(id,0);
	oscore = GetPlayerScore(playerid);
   	SetPlayerScore(playerid, oscore +1);
	}
	}
	}
	else return SendClientMessage(playerid, 0xFF0000FF, "Ova komanda je namijenjena za oficire San Andreasa.Nisi ovlascen da koristis ovu komandu.");
	return 1;
}

sad mi ocitava ovo koristi: /ar id ali kada kucam neci id nista se ne pojavi... mozes li mi to fix brate?

neradi dp!

if(sscanf(params, "u", id)) return SCM(playerid, 0xFF0000FF, "Koristi: /ar [id]");
69

Citat: [SF]C++ poslato Jun 14, 2014, 17:57:44 POSLE PODNE
neradi dp!

if(sscanf(params, "u", id)) return SCM(playerid, 0xFF0000FF, "Koristi: /ar [id]");


i dalje isto kada kucam /ar i neci id nista mi se ne pojavljuje

pa onda nije problem u parametrima nego u kodu ispod.
skriptas uzasno moram ti reci moras da razmisljas kako skratiti kod sto vise.
69

Citat: [SF]C++ poslato Jun 14, 2014, 18:59:25 POSLE PODNE
pa onda nije problem u parametrima nego u kodu ispod.
skriptas uzasno moram ti reci moras da razmisljas kako skratiti kod sto vise.

pa sta cu ja kad ne umijem da prebacujem iz strcmp u zcmd, jedino ako mi mozes ti to prebaciti da ti dam kod, pa cu gledat i shvatiti... u ceu je problem ako ti nije muka... ako mozes ako ne nista onda hehhe

reci mi sta ti tacno treba probacu..
69

Citat: [SF]C++ poslato Jun 14, 2014, 19:02:53 POSLE PODNE
reci mi sta ti tacno treba probacu..


ovu komandu u zcmd pa cu ja posle varijable prilagodit sebi.. ti po ovome ako mozes prebaci, ova komanda je pravo rp.. ako imas vremena i hvala sto hoces kao si rekao :)

    
    if(strcmp(cmd, "/ar", true) == 0) {
    if(IsSpawned[playerid] == 0) {
	SendClientMessage(playerid, COLOR_ERROR, "You are dead. You cannot use this command");
    return 1;
    }
    if(gTeam[playerid] != TEAM_COP && gTeam[playerid] != TEAM_ARMY && gTeam[playerid] != TEAM_BOUNTY) {
    SendClientMessage(playerid,COLOR_ERROR,"You are not a Law Enforcement officer ");
    return 1;
    }
    if(InDerby[playerid] == 1) {
    SendClientMessage(playerid,COLOR_ERROR,"You cannot use this command while you are in the stadium");
    return 1;
    }
    if(Jailed[playerid] ==1) {
    SendClientMessage(playerid, COLOR_ERROR, "You cannot use this command in jail");
    return 1;
    }
    tmp = strtok(cmdtext, idx);
    if(!strlen(tmp)) {
    SendClientMessage(playerid, COLOR_ERROR, "USAGE: /ar (id)");
    return 1;
    }
    giveplayerid = strval(tmp);
    if(!IsNumeric(tmp)) {
    SendClientMessage(playerid, COLOR_ERROR, "USAGE: /ar (id) ID Must be a number");
    return 1;
    }
    if(!IsPlayerConnected(giveplayerid)) {
    format(string, sizeof(string), "ID (%d) is not an active player", giveplayerid);
    SendClientMessage(playerid, COLOR_ERROR, string);
    return 1;
    }
    new oname[24];
    new pname[24];
    GetPlayerName(playerid,oname, 24);
	GetPlayerName(giveplayerid, pname, 24);
	if(GetPlayerWantedLevel(giveplayerid) <= 3) {
	format(string, sizeof(string), "%s(%d) Does not have a warrant. You cannot arrest a player without a warrant",pname,giveplayerid);
	SendClientMessage(playerid,COLOR_ERROR,string);
    return 1;
    }
    if(IsPlayerInAnyVehicle(playerid)) {
    SendClientMessage(playerid,COLOR_ERROR,"You cannot arrest a suspect if you are in a car");
    return 1;
    }
    if(IsPlayerInAnyVehicle(giveplayerid)) {
    format(string, sizeof(string), "%s(%d) Is in a vehicle. Get the suspect out before making the arrest",pname,giveplayerid);
    SendClientMessage(playerid,COLOR_ERROR,string);
    return 1;
    }
    if(GetDistanceBetweenPlayers(playerid,giveplayerid) > 4) {
    format(string, sizeof(string), "%s(%d) Is too far away. You cannot arrest that player",pname,giveplayerid);
    SendClientMessage(playerid,COLOR_ERROR,string);
    return 1;
    }
    if(IsSpawned[giveplayerid] == 0) {
	format(string, sizeof(string), "%s(%d) Is dead. You cannot arrest a dead body",pname,giveplayerid);
    SendClientMessage(playerid,COLOR_ERROR,string);
    return 1;
    }
    SetPlayerVirtualWorld(giveplayerid,0);
    if(GetPlayerWantedLevel(playerid) >=1) {
    SendClientMessage(playerid,COLOR_ERROR,"You cannot use this command if you are wanted by the police");
    return 1;
    }
    if(gTeam[playerid] == TEAM_BOUNTY && EscapedConvict[giveplayerid] == 0) {
    SendClientMessage(playerid,COLOR_ERROR,"That player is not on your bounty list. Type /bounty for details");
    return 1;
    }
    if(giveplayerid == playerid) {
    SendClientMessage(playerid,COLOR_ERROR,"You cannot arrest yourself");
    return 1;
    }
    if(gTeam[playerid] == TEAM_BOUNTY && EscapedConvict[giveplayerid] == 1 && GetPlayerWantedLevel(giveplayerid) >=10) {
    SetPlayerInterior(giveplayerid,10);
    new rnd;
    rnd = random(sizeof (AlcatrazArrestedSpawn));
    SetPlayerPos(giveplayerid, AlcatrazArrestedSpawn[rnd][0], AlcatrazArrestedSpawn[rnd][1], AlcatrazArrestedSpawn[rnd][2]);
    SetPlayerFacingAngle(giveplayerid, AlcatrazArrestedSpawn[rnd][3]);
    format(string, sizeof(string), "Bounty Hunter %s(%d) has re-captured Escaped Convict %s(%d) and has sent the suspect to Alcatraz",oname,playerid,pname,giveplayerid);
    SendClientMessageToAll(0x00C7FFAA, string);
    
    SendClientMessage(giveplayerid, 0xA9A9A9AA, "|_You Have Been Busted By A Bounty Hunter_|");
    format(string, sizeof(string), "You have been sent to Alcatraz by Bounty Hunter %s(%d)",oname,playerid);
    SendClientMessage(giveplayerid,0x00C7FFAA, string);
    SendClientMessage(giveplayerid,0x00C7FFAA,"You will be auto-released from Alcatraz once you have served your sentence");
    SendClientMessage(giveplayerid,0x00C7FFAA,"If Alcatraz life sucks for you... Why not ask a friend to visit you? /reqvisit (id)");
    SendClientMessage(playerid, 0xA9A9A9AA, "|_Suspect Arrested_|");
    format(string, sizeof(string), "You have sent escaped prisoner %s(%d) to Alcatraz - you receive a $5000 re-capture bonus",pname,giveplayerid);
    SendClientMessage(playerid,0x00C7FFAA, string);
    GameTextForPlayer(playerid,"~b~Suspect Arrested",5000,3);
    format(string, sizeof(string), "Escaped Convict %s(%d) has been re-arrested and sent to Alcatraz by Bounty Hunter %s(%d)",pname,giveplayerid,oname,playerid);
    printf("%s", string);
    SendClientMessage(giveplayerid,0xFF7F50AA,"If you leave the server while you are in jail you WILL be banned");
    GivePlayerMoney(playerid,5000);
	Jailed[giveplayerid] =1;
	InAlcatraz[giveplayerid] =1;
	StoleCopCarRecent[giveplayerid] =0;
	triedtoescaperecent[giveplayerid] =1;
	ResetPlayerWeapons(giveplayerid);
	JailTime[giveplayerid] =320;
	JailTimeServed[giveplayerid] =0;
	EscapedConvict[giveplayerid] =0;
	SetPlayerWantedLevel(giveplayerid,0);
	oscore = GetPlayerScore(playerid);
   	SetPlayerScore(playerid, oscore +1);
	return 1;
    }
  
    if(EscapedConvict[giveplayerid] == 1 && GetPlayerWantedLevel(giveplayerid) >=10) {
    SetPlayerInterior(giveplayerid,10);
    new rnd;
    rnd = random(sizeof (AlcatrazArrestedSpawn));
    SetPlayerPos(giveplayerid, AlcatrazArrestedSpawn[rnd][0], AlcatrazArrestedSpawn[rnd][1], AlcatrazArrestedSpawn[rnd][2]);
    SetPlayerFacingAngle(giveplayerid, AlcatrazArrestedSpawn[rnd][3]);
    format(string, sizeof(string), "Escaped Convict %s(%d) has been re-arrested and sent to Alcatraz by Officer %s(%d) ",pname,giveplayerid,oname,playerid);
    SendClientMessageToAll(0x00C7FFAA, string);
    
    SendClientMessage(giveplayerid, 0xA9A9A9AA, "|_You Have Been Arrested_|");
    format(string, sizeof(string), "You have been sent to Alcatraz by Officer %s(%d)",oname,playerid);
    SendClientMessage(giveplayerid,0x00C7FFAA, string);
    SendClientMessage(giveplayerid,0x00C7FFAA,"You will be auto-released from Alcatraz once you have served your sentence");
    SendClientMessage(giveplayerid,0x00C7FFAA,"If Alcatraz life sucks for you... Why not ask a friend to visit you? /reqvisit (id)");
    SendClientMessage(playerid, 0xA9A9A9AA, "|_Suspect Arrested_|");
    format(string, sizeof(string), "You have sent escaped prisoner %s(%d) to Alcatraz - you receive a $4000 re-capture bonus",pname,giveplayerid);
    SendClientMessage(playerid,0x00C7FFAA, string);
    GameTextForPlayer(playerid,"~b~Suspect Arrested",5000,3);
    format(string, sizeof(string), "Escaped Convict %s(%d) has been re-arrested and sent to Alcatraz by Officer %s(%d)",pname,giveplayerid,oname,playerid);
    printf("%s", string);
    SendClientMessage(giveplayerid,0xFF7F50AA,"If you leave the server while you are in jail you WILL be banned");
    GivePlayerMoney(playerid,4000);
	Jailed[giveplayerid] =1;
	InAlcatraz[giveplayerid] =1;
	StoleCopCarRecent[giveplayerid] =0;
	triedtoescaperecent[giveplayerid] =1;
	ResetPlayerWeapons(giveplayerid);
	JailTime[giveplayerid] =320;
	JailTimeServed[giveplayerid] =0;
	EscapedConvict[giveplayerid] =0;
	SetPlayerWantedLevel(giveplayerid,0);
	oscore = GetPlayerScore(playerid);
   	SetPlayerScore(playerid, oscore +1);
	return 1;
    }
    if(GetPlayerWantedLevel(giveplayerid) >=4 && GetPlayerWantedLevel(giveplayerid) <=5) {
    SetPlayerInterior(giveplayerid,3);
    new rnd;
    rnd = random(sizeof (ArrestedSpawn));
    SetPlayerPos(giveplayerid, ArrestedSpawn[rnd][0], ArrestedSpawn[rnd][1], ArrestedSpawn[rnd][2]);
    SetPlayerFacingAngle(giveplayerid, ArrestedSpawn[rnd][3]);
    format(string, sizeof(string), "Wanted suspect %s(%d) has been arrested by Officer %s(%d) ",pname,giveplayerid,oname,playerid);
    SendClientMessageToAll(0x00C7FFAA, string);
    
    SendClientMessage(giveplayerid, 0xA9A9A9AA, "|_You Have Been Arrested_|");
    format(string, sizeof(string), "You were Arrested by Officer %s(%d)",oname,playerid);
    SendClientMessage(giveplayerid,0x00C7FFAA, string);
    SendClientMessage(giveplayerid,0x00C7FFAA,"You will be auto-released from jail or a Police Officer/Jail Turnkey can release you early");
    SendClientMessage(giveplayerid,0x00C7FFAA,"If jail life sucks for you... Why not try /escape");
    SendClientMessage(playerid, 0xA9A9A9AA, "|_Suspect Arrested_|");
    format(string, sizeof(string), "You have arrested %s(%d) - you receive a $1500 bonus",pname,giveplayerid);
    SendClientMessage(playerid,0x00C7FFAA, string);
    GameTextForPlayer(playerid,"~b~Suspect Arrested",5000,3);
    format(string, sizeof(string), "Wanted suspect %s(%d) has been arrested by Officer %s(%d)",pname,giveplayerid,oname,playerid);
    printf("%s", string);
    SendClientMessage(giveplayerid,0xFF7F50AA,"If you leave the server while you are in jail you WILL be banned");
    GivePlayerMoney(playerid,1500);
	Jailed[giveplayerid] =1;
	StoleCopCarRecent[giveplayerid] =0;
	triedtoescaperecent[giveplayerid] =1;
	ResetPlayerWeapons(giveplayerid);
	JailTime[giveplayerid] =80;
	JailTimeServed[giveplayerid] =0;
	SetPlayerWantedLevel(giveplayerid,0);
	oscore = GetPlayerScore(playerid);
   	SetPlayerScore(playerid, oscore +1);
	return 1;
    }
    if(GetPlayerWantedLevel(giveplayerid) >=6 && GetPlayerWantedLevel(giveplayerid) <=8) {
    SetPlayerInterior(giveplayerid,3);
    new rnd;
    rnd = random(sizeof (ArrestedSpawn));
    SetPlayerPos(giveplayerid, ArrestedSpawn[rnd][0], ArrestedSpawn[rnd][1], ArrestedSpawn[rnd][2]);
    SetPlayerFacingAngle(giveplayerid, ArrestedSpawn[rnd][3]);
    format(string, sizeof(string), "Wanted suspect %s(%d) has been arrested by Officer %s(%d) ",pname,giveplayerid,oname,playerid);
    SendClientMessageToAll(0x00C7FFAA, string);
    
    SendClientMessage(giveplayerid, 0xA9A9A9AA, "|_You Have Been Arrested_|");
    format(string, sizeof(string), "You were Arrested by Officer %s(%d)",oname,playerid);
    SendClientMessage(giveplayerid,0x00C7FFAA, string);
    GameTextForPlayer(playerid,"~b~Suspect Arrested",5000,3);
    SendClientMessage(giveplayerid,0x00C7FFAA,"You will be auto-released from jail or a Police Officer/Jail Turnkey can release you early");
    SendClientMessage(giveplayerid,0x00C7FFAA,"If jail life sucks for you... Why not try /escape");
    SendClientMessage(playerid, 0xA9A9A9AA, "|_Suspect Arrested_|");
    format(string, sizeof(string), "You have arrested %s(%d) - you receive a $2000 bonus",pname,giveplayerid);
    SendClientMessage(playerid,0x00C7FFAA, string);
    format(string, sizeof(string), "Wanted suspect %s(%d) has been arrested by Officer %s(%d)",pname,giveplayerid,oname,playerid);
    printf("%s", string);
    SendClientMessage(giveplayerid,0xFF7F50AA,"If you leave the server while you are in jail you WILL be banned");
    GivePlayerMoney(playerid,2000);
	Jailed[giveplayerid] =1;
	
	StoleCopCarRecent[giveplayerid] =0;
	triedtoescaperecent[giveplayerid] =1;
	ResetPlayerWeapons(giveplayerid);
	JailTime[giveplayerid] =140;
	JailTimeServed[giveplayerid] =0;
	SetPlayerWantedLevel(giveplayerid,0);
	oscore = GetPlayerScore(playerid);
   	SetPlayerScore(playerid, oscore +1);
	return 1;
    }

    if(GetPlayerWantedLevel(giveplayerid) == 9) {
    SetPlayerInterior(giveplayerid,3);
    new rnd;
    rnd = random(sizeof (ArrestedSpawn));
    SetPlayerPos(giveplayerid, ArrestedSpawn[rnd][0], ArrestedSpawn[rnd][1], ArrestedSpawn[rnd][2]);
    SetPlayerFacingAngle(giveplayerid, ArrestedSpawn[rnd][3]);
    format(string, sizeof(string), "Wanted suspect %s(%d) has been arrested by Officer %s(%d) ",pname,giveplayerid,oname,playerid);
    SendClientMessageToAll(0x00C7FFAA, string);
    
    SendClientMessage(giveplayerid, 0xA9A9A9AA, "|_You Have Been Arrested_|");
    format(string, sizeof(string), "You were Arrested by Officer %s(%d)",oname,playerid);
    SendClientMessage(giveplayerid,0x00C7FFAA, string);
    SendClientMessage(giveplayerid,0x00C7FFAA,"You will be auto-released from jail or a Police Officer/Jail Turnkey can release you early");
    SendClientMessage(giveplayerid,0x00C7FFAA,"If jail life sucks for you... Why not try /escape");
    SendClientMessage(playerid, 0xA9A9A9AA, "|_Suspect Arrested_|");
    format(string, sizeof(string), "You have arrested %s(%d) - you receive a $2500 bonus",pname,giveplayerid);
    SendClientMessage(playerid,0x00C7FFAA, string);
    GameTextForPlayer(playerid,"~b~Suspect Arrested",5000,3);
    format(string, sizeof(string), "Wanted suspect %s(%d) has been arrested by Officer %s(%d)",pname,giveplayerid,oname,playerid);
    printf("%s", string);
    SendClientMessage(giveplayerid,0xFF7F50AA,"If you leave the server while you are in jail you WILL be banned");
    GivePlayerMoney(playerid,2500);
	Jailed[giveplayerid] =1;
	StoleCopCarRecent[giveplayerid] =0;
	triedtoescaperecent[giveplayerid] =1;
	ResetPlayerWeapons(giveplayerid);
	JailTime[giveplayerid] =200;
	JailTimeServed[giveplayerid] =0;
	SetPlayerWantedLevel(giveplayerid,0);
	oscore = GetPlayerScore(playerid);
   	SetPlayerScore(playerid, oscore +1);
	return 1;
    }
    if(GetPlayerWantedLevel(giveplayerid) >=10 && GetPlayerWantedLevel(giveplayerid) <=14) {
    SetPlayerInterior(giveplayerid,10);
    new rnd;
    rnd = random(sizeof (AlcatrazArrestedSpawn));
    SetPlayerPos(giveplayerid, AlcatrazArrestedSpawn[rnd][0], AlcatrazArrestedSpawn[rnd][1], AlcatrazArrestedSpawn[rnd][2]);
    SetPlayerFacingAngle(giveplayerid, AlcatrazArrestedSpawn[rnd][3]);
    format(string, sizeof(string), "Most Wanted suspect %s(%d) has been sent to Alcatraz by Officer %s(%d) ",pname,giveplayerid,oname,playerid);
    SendClientMessageToAll(0x00C7FFAA, string);
    
    SendClientMessage(giveplayerid, 0xA9A9A9AA, "|_You Have Been Arrested_|");
    format(string, sizeof(string), "You have been sent to Alcatraz by Officer %s(%d)",oname,playerid);
    SendClientMessage(giveplayerid,0x00C7FFAA, string);
    SendClientMessage(giveplayerid,0x00C7FFAA,"You will be auto-released from Alcatraz once you have served your sentence");
    SendClientMessage(giveplayerid,0x00C7FFAA,"If Alcatraz life sucks for you... Why not ask a friend to visit you? /reqvisit (id)");
    SendClientMessage(playerid, 0xA9A9A9AA, "|_Suspect Arrested_|");
    format(string, sizeof(string), "You have sent Most Wanted suspect %s(%d) to Alcatraz - you receive a $3000 bonus",pname,giveplayerid);
    SendClientMessage(playerid,0x00C7FFAA, string);
    GameTextForPlayer(playerid,"~b~Suspect Arrested",5000,3);
    format(string, sizeof(string), "Most Wanted suspect %s(%d) has been arrested and sent to Alcatraz by Officer %s(%d) ",pname,giveplayerid,oname,playerid);
    printf("%s", string);
    SendClientMessage(giveplayerid,0xFF7F50AA,"If you leave the server while you are in jail you WILL be banned");
    GivePlayerMoney(playerid,3000);
	Jailed[giveplayerid] =1;
	InAlcatraz[giveplayerid] =1;
	StoleCopCarRecent[giveplayerid] =0;
	triedtoescaperecent[giveplayerid] =1;
	ResetPlayerWeapons(giveplayerid);
	JailTime[giveplayerid] =280;
	JailTimeServed[giveplayerid] =0;
	SetPlayerWantedLevel(giveplayerid,0);
	oscore = GetPlayerScore(playerid);
   	SetPlayerScore(playerid, oscore +1);
	return 1;
    }
    if(GetPlayerWantedLevel(giveplayerid) >=15 && GetPlayerWantedLevel(giveplayerid) <=24) {
    SetPlayerInterior(giveplayerid,10);
    new rnd;
    rnd = random(sizeof (AlcatrazArrestedSpawn));
    SetPlayerPos(giveplayerid, AlcatrazArrestedSpawn[rnd][0], AlcatrazArrestedSpawn[rnd][1], AlcatrazArrestedSpawn[rnd][2]);
    SetPlayerFacingAngle(giveplayerid, AlcatrazArrestedSpawn[rnd][3]);
    format(string, sizeof(string), "Most Wanted suspect %s(%d) has been sent to Alcatraz by Officer %s(%d) ",pname,giveplayerid,oname,playerid);
    SendClientMessageToAll(0x00C7FFAA, string);
    
    SendClientMessage(giveplayerid, 0xA9A9A9AA, "|_You Have Been Arrested_|");
    format(string, sizeof(string), "You have been sent to Alcatraz by Officer %s(%d)",oname,playerid);
    SendClientMessage(giveplayerid,0x00C7FFAA, string);
    SendClientMessage(giveplayerid,0x00C7FFAA,"You will be auto-released from Alcatraz once you have served your sentence");
    SendClientMessage(giveplayerid,0x00C7FFAA,"If Alcatraz life sucks for you... Why not ask a friend to visit you? /reqvisit (id)");
    SendClientMessage(playerid, 0xA9A9A9AA, "|_Suspect Arrested_|");
    format(string, sizeof(string), "You have sent Most Wanted suspect %s(%d) to Alcatraz - you receive a $3500 bonus",pname,giveplayerid);
    SendClientMessage(playerid,0x00C7FFAA, string);
    GameTextForPlayer(playerid,"~b~Suspect Arrested",5000,3);
    format(string, sizeof(string), "Most Wanted suspect %s(%d) has been arrested and sent to Alcatraz by Officer %s(%d) ",pname,giveplayerid,oname,playerid);
    printf("%s", string);
    SendClientMessage(giveplayerid,0xFF7F50AA,"If you leave the server while you are in jail you WILL be banned");
    GivePlayerMoney(playerid,3500);
	Jailed[giveplayerid] =1;
	InAlcatraz[giveplayerid] =1;
	StoleCopCarRecent[giveplayerid] =0;
	triedtoescaperecent[giveplayerid] =1;
	ResetPlayerWeapons(giveplayerid);
	JailTime[giveplayerid] =320;
	JailTimeServed[giveplayerid] =0;
	SetPlayerWantedLevel(giveplayerid,0);
	oscore = GetPlayerScore(playerid);
   	SetPlayerScore(playerid, oscore +1);
	return 1;
    }
    if(GetPlayerWantedLevel(giveplayerid) >=25) {
    SetPlayerInterior(giveplayerid,10);
    new rnd;
    rnd = random(sizeof (AlcatrazArrestedSpawn));
    SetPlayerPos(giveplayerid, AlcatrazArrestedSpawn[rnd][0], AlcatrazArrestedSpawn[rnd][1], AlcatrazArrestedSpawn[rnd][2]);
    SetPlayerFacingAngle(giveplayerid, AlcatrazArrestedSpawn[rnd][3]);
    format(string, sizeof(string), "Most Wanted suspect %s(%d) has been sent to Alcatraz by Officer %s(%d) ",pname,giveplayerid,oname,playerid);
    SendClientMessageToAll(0x00C7FFAA, string);
    
    SendClientMessage(giveplayerid, 0xA9A9A9AA, "|_You Have Been Arrested_|");
    format(string, sizeof(string), "You have been sent to Alcatraz by Officer %s(%d)",oname,playerid);
    SendClientMessage(giveplayerid,0x00C7FFAA, string);
    SendClientMessage(giveplayerid,0x00C7FFAA,"You will be auto-released from Alcatraz once you have served your sentence");
    SendClientMessage(giveplayerid,0x00C7FFAA,"If Alcatraz life sucks for you... Why not ask a friend to visit you? /reqvisit (id)");
    SendClientMessage(playerid, 0xA9A9A9AA, "|_Suspect Arrested_|");
    format(string, sizeof(string), "You have sent Most Wanted suspect %s(%d) to Alcatraz - you receive a $4000 bonus",pname,giveplayerid);
    SendClientMessage(playerid,0x00C7FFAA, string);
    GameTextForPlayer(playerid,"~b~Suspect Arrested",5000,3);
    format(string, sizeof(string), "Most Wanted suspect %s(%d) has been arrested and sent to Alcatraz by Officer %s(%d) ",pname,giveplayerid,oname,playerid);
    printf("%s", string);
    SendClientMessage(giveplayerid,0xFF7F50AA,"If you leave the server while you are in jail you WILL be banned");
    GivePlayerMoney(playerid,4000);
	Jailed[giveplayerid] =1;
	InAlcatraz[giveplayerid] =1;
	StoleCopCarRecent[giveplayerid] =0;
	triedtoescaperecent[giveplayerid] =1;
	ResetPlayerWeapons(giveplayerid);
	JailTime[giveplayerid] =420;
	JailTimeServed[giveplayerid] =0;
	SetPlayerWantedLevel(giveplayerid,0);
	oscore = GetPlayerScore(playerid);
   	SetPlayerScore(playerid, oscore +2);
    }
    return 1;
    }


pa cu posle ja gledat odavde da shvatim gde sam napravio gresku...

necu je prebacivati reci sta treba da sadrzi komanda da ti uradim princip i onda ti je lako.
69

Citat: [SF]C++ poslato Jun 14, 2014, 19:07:22 POSLE PODNE
necu je prebacivati reci sta treba da sadrzi komanda da ti uradim princip i onda ti je lako.

Pa ovo iz komande sto sam ti gore dao...

uradicu ti ja samo pojasni sta da sadrzava.
ovaj kod je neuredan.
Poslednja Izmena: Jun 14, 2014, 19:18:30 POSLE PODNE od [SF]C++
69