Jump to content
  • 0

pomoc pomoc zatknut


Guest Mafia1353

Dotaz

cawte takito mam prikaz a cem to tak aby to fungovalo na 100% ze ked niesom fizl tak nech to ukaze musis byt policajt a ked som fizl tak nech nejde zatknut sameho seba a ked cem zatknut id 1 napr tak nech musim byt prinom dikes za pomoc

 

if(strcmp(cmd, "/zatknut", true) == 0){

new tmp[256];

new zatknout;

tmp = strtok(cmdtext, idx);

if (iPlayerRole[playerid] == 2)

{

if(!strlen(tmp)) {

SendClientMessage(playerid, COLOR_WHITE, "POUŽI: /zatknut [iD]");

return 1;

}

zatknout = strval(tmp);

if(!IsPlayerConnected(zatknout)){

SendClientMessage(playerid, COLOR_RED, "Špatné ID!");

return 1;

}

//-

if (GetDistanceBetweenPlayers(playerid,giveplayerid) >= 20) {

SendClientMessage(playerid,COLOR_RED,"[!] Si příliš ďaleko!");

//-

GetPlayerName(zatknout, giveplayer, sizeof(giveplayer));

GetPlayerName(playerid, sendername, sizeof(sendername));

format(string, sizeof(string), "Hráč %s bol zatknutý policajtom %s.", giveplayer, sendername);

SendClientMessageToAll(COLOR_LIGHTBLUE, string);

jailed[zatknout]=1;

iPlayerRole[zatknout] = 0;

ResetPlayerWeapons(zatknout);

SetPlayerSkin(zatknout, 73);

SetPlayerColor(zatknout, COLOR_GREY);

printf(string);

//SetPlayerInterior(zatknout,3);

SetPlayerPos(zatknout,43.944,2024.824,17.301);

}else{

if (iPlayerRole[playerid] == 2)

{

SendClientMessage(playerid, COLOR_LIGHTBLUE, "Musíš byť policajt!");

}else{

if(giveplayerid == playerid) return SendClientMessage(playerid, COLOR_RED, "Sám seba nemožeš zatknut");

}}}

return 1;

}

Link to comment
Share on other sites

7 odpovědí na tuto otázku

Recommended Posts

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...