Problem for a cmd
#1

Hello, I'm would like help for my command, when i compiled this script he don't have error.
But In Game this command do nothing.

Код:
CMD:fdl(playerid, params[])
{
   	new subcmd[30], string[255];
	if(InfosJoueur[playerid][jFaction] == 1 || InfosJoueur[playerid][jFaction] == 2 || InfosJoueur[playerid][jFaction] == 4)
 	{
		if(sscanf(params, "s", subcmd))
		{
			SendClientMessage(playerid, COLOR_USAGE, "{FF6600}[Action]{99EEFF} /fdl <nom>");
			
		    SendClientMessage(playerid, COLOR_USAGE, "{FF6600}[Action]{99EEFF} service, raporter, suspect, rechercher, consulter");
			SendClientMessage(playerid, COLOR_USAGE, "{FF6600}[Action]{99EEFF} papiers, forcer, menotter, amende, voiture, (def)oncer, sirene, habits");
			SendClientMessage(playerid, COLOR_USAGE, "{FF6600}[Action]{99EEFF} (back)up, barrage, rrb, prendre, arreter, (m)egaphone, droits, porte");

			if(InfosJoueur[playerid][jRang] >= 3) return SendClientMessage(playerid, COLOR_USAGE, "{FF6600}[Action]{99EEFF} Rang 3 : herse creer - supprimer, coffre");
		   	if(InfosJoueur[playerid][jRang] >= 4) return SendClientMessage(playerid, COLOR_USAGE, "{FF6600}[Action]{99EEFF} Rang 4 : herse supall");
		  	if(InfosJoueur[playerid][jRang] >= 5) return SendClientMessage(playerid, COLOR_USAGE, "{FF6600}[Action]{99EEFF} Rang 5 : delivrer, rrball");
		   	if(InfosJoueur[playerid][jRang] >= 6) return SendClientMessage(playerid, COLOR_USAGE, "{FF6600}[Action]{99EEFF} Rang 6 : liberer - Rang 7 : ann)once");
			return 1;
		}

		if(strcmp(subcmd, "suspendre", true) == 0 || strcmp(subcmd, "dispenser", true) == 0)
		{
		    new joueurid,minutes;
			if(InfosJoueur[playerid][jRang] != 7) return SendClientMessage(playerid, COLOR_COPS, "{FF6600}[Force De l'Ordre]{11BB00} Il vous faut le rang 7 minimum pour cette commande.");
			if(!sscanf(params, "ii", joueurid,minutes))
			{
				SendClientMessage(playerid, COLOR_USAGE, "{FF6600}[Action]{99EEFF} /fdl suspendre <id> <temps en minutes>");
				SendClientMessage(playerid, COLOR_COPS, "{FF6600}[Force De l'Ordre]{11BB00} A utiliser que en cas de bйtise du policier.");
				return 1;
			}
			if(!IsPlayerConnected(joueurid)) return SendClientMessage(playerid, COLOR_SERVER, "[Erreur] Joueur invalide ou non connectй actuellement.");
			if(InfosJoueur[joueurid][jFaction] == InfosJoueur[playerid][jFaction]) return SendClientMessage(playerid, COLOR_SERVER, "[Info] Ce joueur n'est pas de votre judiriction.");
			if(InfosJoueur[joueurid][jSuspendue] != 0) return SendClientMessage(playerid, COLOR_COPS, "{FF6600}[Police]{11BB00} Ce joueur est dйja suspendu.");

			if(minutes < 1 || minutes > 300)
			{
				SendClientMessage(playerid, COLOR_COPS, "[Force De l'Ordre] Le temps doit кtre compris entre 1 et 300 minutes.");
				return 1;
			}
			cop_suspCops(playerid,joueurid,minutes);
			return 1;
		} 
       }
}
Thank you in advance
Reply
#2

nobody can help me ?
Reply
#3

What's this code supposed to do? I couldn't understand anything because of variable names.
Reply
#4

This code is for suspend a cop, if he makes a mistake in the faction.
Reply
#5

Please post the function cop_suspCops().
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)