Mine sisusse
Otsi siit
  • Rohkem valikuid...
Otsi tulemusi mis sisaldab...
Otsi tulemusi...
Külaline K3nX

GM

Soovitatud postitused

Külaline K3nX

Oleks vaja väikest abi, võin ka tasu välja käia

Viga selline CNR modil ,et

Panen nt /cuff 1

Siis ütleb ,et usage /cuff (id) kuigi see ID on sees ja see peaks 2ra cuffima ID 1, arrestiga, rapega, robiga jne sama asi, admin commanditel ja muudel kh see probleem.

Muudetud liikme K3nX'i poolt

Jaga seda postitust


Postituse link
Share on other sites

Kas sa kasutad sscanf?

Kui jah siis:

if(sscanf(params, "i", id)) return SendClientMessage(playerid, COLOR_GRAD2, "USAGE: {FFFFFF}/cuff [id]");

if(id == INVALID_PLAYER_ID) return SendClientMessage(playerid, COLOR_GREY, "* This player is not in server..");

Jaga seda postitust


Postituse link
Share on other sites
Külaline K3nX
Author of the topic Postitas

command(cuff, playerid, params[])
{
new ID; new pname[24]; new opname[24]; new string[200];
if(gTeam[playerid] ==Team_Civi || gTeam[playerid] == Team_Rape || gTeam[playerid] == Team_Terror || gTeam[playerid] == Team_Steal || gTeam[playerid] == Team_PrvtMed) return SendClientMessage(playerid, COLOR_ERROR, "Only Cops/Army can use this command");
if(GetPVarInt(playerid, "Spawned") == 0) return SendClientMessage(playerid, COLOR_ERROR, "You cannot use this command.");
if(IsPlayerInAnyVehicle(playerid)) return SendClientMessage(playerid, COLOR_ERROR, "You cannot use this command in a vehicle.");
if(sscanf(params, "u", ID)) return SendClientMessage(playerid, COLOR_ERROR, "Usage: /cuff (ID)");
if(!IsPlayerConnected(ID)) return SendClientMessage(playerid, COLOR_ERROR, "Invalid ID.");
GetPlayerName(ID, opname, 24); GetPlayerName(playerid, pname, 24);
if(GetDistanceBetweenPlayers(playerid, ID) > 3) return SendClientMessage(playerid, COLOR_ERROR, "That player is too far away to hand cuff.");
if(GetPVarInt(ID, "Cuffed") == 1) return SendClientMessage(playerid, COLOR_ERROR, "That player is already cuffed.");
if(GetPVarInt(ID, "Jailed") == 1) return SendClientMessage(playerid, COLOR_ERROR, "You cannot cuff a prisoner.");
if(IsPlayerInAnyVehicle(ID)) return SendClientMessage(playerid, COLOR_ERROR, "That player is in a vehicle. You cannot cuff him.");
if(gTeam[iD] == Team_Cop || gTeam[iD] == Team_Army || gTeam[iD] == Team_FBI) return SendClientMessage(playerid, COLOR_ERROR, "You cannot cuff other Police Officers.");
TogglePlayerControllable(ID, 0);
GameTextForPlayer(ID, "~b~HANDCUFFED!", 5000, 1);
format(string, sizeof(string), "[POLICE] Officer %s(%d) has put hand cuffs on you. You cannot move.", pname, playerid);
SendClientMessage(ID, COLOR_DODGERBLUE, string);
format(string, 200, "[DISPATCH] Officer %s(%d) has cuffed player %s(%d)", pname, playerid, opname, ID);
SendCopMessage(string);
SetPVarInt(ID, "Cuffed", 1);
SetPVarInt(ID, "CuffTimer", 30);
SendClientMessage(playerid, COLOR_DODGERBLUE, "[POLICE] You have cuffed a suspect. You have 30 seconds before they are let loose.");
return 1;
}

 

Jah, mul nii.

Jaga seda postitust


Postituse link
Share on other sites
SUPERVIP

Jaga seda postitust


Postituse link
Share on other sites
Külaline
This topic is now closed to further replies.

×
×
  • Loo uus...

Oluline informatsioon

Selle veebisaidi paremaks muutmiseks oleme teie seadmesse paigutanud küpsised . Võite kohandada oma küpsiste seadeid , vastasel juhul eeldame, et te olete küpsiste kasutamisega nõus kui jätkate veebisaidil sirvimist.. Palun lugege läbi Kasutustingimused ja Privaatsuspoliitika.