if (strcmp("/taze", cmd, true) == 0) { new giveplayerid; new giveplayer[MAX_PLAYER_NAME]; new sendername[MAX_PLAYER_NAME]; tmp = strtok(cmdtext, idx); if(gTeam[playerid] == TEAM_COP) SendClientMessage(playerid, COLOR_ORANGE, "Only Law Enforcement can use this command"); if(!strlen(tmp)) return SendClientMessage(playerid,COLOR_ORANGE,"USAGE: /taze [playerid]"); if(IsPlayerConnected(strval(tmp)) == 0) return SendClientMessage(playerid, COLOR_ORANGE, "[ERROR]: The ID you have entered does not exist!"); giveplayerid = ReturnUser(tmp); if(gTeam[playerid] == TEAM_COP) { if(gTeam[giveplayerid] == TEAM_COP) return SendClientMessage(playerid,0xAA3333AA,"You cannot taze police officers !"); TogglePlayerControllable(giveplayerid,0); GetPlayerName(giveplayerid,giveplayer,sizeof(giveplayer)); GetPlayerName(playerid,sendername,sizeof(sendername)); format(tmp,sizeof(tmp),"You have tazed %s",giveplayer); SendClientMessage(playerid,0x33AA33AA,tmp); format(tmp,sizeof(tmp),"You have been tazed by %s",sendername); SendClientMessage(giveplayerid,0xAA3333AA,tmp); PlayerTazed[playerid] = true; SetTimerEx("Taze",8*1000,0,"i",playerid); } return 1; }
if(gTeam[playerid] == TEAM_COP) SendClientMessage(playerid, COLOR_ORANGE, "Only Law Enforcement can use this command");
if(gTeam[playerid] != TEAM_COP) SendClientMessage(playerid, COLOR_ORANGE, "Only Law Enforcement can use this command");
Originally Posted by Don Correlli
Change:
pawn Код:
pawn Код:
|
{ new cmd[256]; new tmp[256]; new idx; cmd = strtok(cmdtext, idx); if (strcmp("/cuff", cmd, true) == 0) { new giveplayerid; new giveplayer[MAX_PLAYER_NAME]; new sendername[MAX_PLAYER_NAME]; tmp = strtok(cmdtext, idx); if(gTeam[giveplayerid] == TEAM_COP) return SendClientMessage(playerid,COLOR_ORANGE,"Only Law enforcement agents can use this command!"); if(!strlen(tmp)) return SendClientMessage(playerid,COLOR_ORANGE,"USAGE: /cuff [playerid]"); if(IsPlayerConnected(strval(tmp)) == 0) return SendClientMessage(playerid, COLOR_ORANGE, "[ERROR]: That ID not an active player "); giveplayerid = ReturnUser(tmp); if(gTeam[playerid] == TEAM_COP) { if(gTeam[giveplayerid] == TEAM_COP) return SendClientMessage(playerid,0xAA3333AA,"You cannot cuff cops !"); TogglePlayerControllable(giveplayerid,0); GetPlayerName(giveplayerid,giveplayer,sizeof(giveplayer)); GetPlayerName(playerid,sendername,sizeof(sendername)); format(tmp,sizeof(tmp),"You have cuffed %s",giveplayer); SendClientMessage(playerid,0x33AA33AA,tmp); format(tmp,sizeof(tmp),"You have been cuffed by %s",sendername); SendClientMessage(giveplayerid,0xAA3333AA,tmp); } else return SendClientMessage(playerid,COLOR_GREY, "You are not a cop!"); return 1; }
if (strcmp("/uncuff", cmd, true) == 0) { new giveplayerid; new giveplayer[MAX_PLAYER_NAME]; new sendername[MAX_PLAYER_NAME]; tmp = strtok(cmdtext, idx); if(gTeam[playerid] == TEAM_COP) SendClientMessage(playerid, COLOR_ORANGE, "Only Law Enforcement can use this command"); if(!strlen(tmp)) return SendClientMessage(playerid,COLOR_ORANGE,"USAGE: /uncuff [playerid]"); if(IsPlayerConnected(strval(tmp)) == 0) return SendClientMessage(playerid, COLOR_ORANGE, "[ERROR]: The ID you have entered does not exist!"); giveplayerid = ReturnUser(tmp); if(gTeam[playerid] == TEAM_COP) { if(gTeam[giveplayerid] == TEAM_COP) return SendClientMessage(playerid,0xAA3333AA,"You cannot cuff police officers !"); TogglePlayerControllable(giveplayerid,1); GetPlayerName(giveplayerid,giveplayer,sizeof(giveplayer)); GetPlayerName(playerid,sendername,sizeof(sendername)); format(tmp,sizeof(tmp),"You have uncuffed %s",giveplayer); SendClientMessage(playerid,0x33AA33AA,tmp); format(tmp,sizeof(tmp),"You have been uncuffed by %s",sendername); SendClientMessage(giveplayerid,0xAA3333AA,tmp); } else return SendClientMessage(playerid,COLOR_GREY, "You are not a cop!"); return 0; }
if (strcmp("/taze", cmd, true) == 0) { new giveplayerid; new giveplayer[MAX_PLAYER_NAME]; new sendername[MAX_PLAYER_NAME]; tmp = strtok(cmdtext, idx); if(gTeam[playerid] == TEAM_COP) SendClientMessage(playerid, COLOR_ORANGE, "Only Law Enforcement can use this command"); if(!strlen(tmp)) return SendClientMessage(playerid,COLOR_ORANGE,"USAGE: /taze [playerid]"); if(IsPlayerConnected(strval(tmp)) == 0) return SendClientMessage(playerid, COLOR_ORANGE, "[ERROR]: The ID you have entered does not exist!"); giveplayerid = ReturnUser(tmp); if(gTeam[playerid] == TEAM_COP) { if(gTeam[giveplayerid] == TEAM_COP) return SendClientMessage(playerid,0xAA3333AA,"You cannot taze police officers !"); TogglePlayerControllable(giveplayerid,0); GetPlayerName(giveplayerid,giveplayer,sizeof(giveplayer)); GetPlayerName(playerid,sendername,sizeof(sendername)); format(tmp,sizeof(tmp),"You have tazed %s",giveplayer); SendClientMessage(playerid,0x33AA33AA,tmp); format(tmp,sizeof(tmp),"You have been tazed by %s",sendername); SendClientMessage(giveplayerid,0xAA3333AA,tmp); PlayerTazed[playerid] = true; SetTimerEx("Taze",8*1000,0,"i",playerid); } return 1; }
Originally Posted by Don Correlli
Change:
pawn Код:
pawn Код:
|
Originally Posted by Don Correlli
Same as before:
Quote:
|