04.02.2011, 23:51
Hello could some1 help me convert this script for me cuz aint working;S i think the problem is "dcmd"
here is the script
if any1 understand these terms please help me !
here is the script
Код:
#define dcmd(%1,%2,%3) if (!strcmp((%3)[1], #%1, true, (%2)) && ((((%3)[(%2) + 1] == '\0') && (dcmd_%1(playerid, ""))) || (((%3)[(%2) + 1] == ' ') && (dcmd_%1(playerid, (%3)[(%2) + 2]))))) return 1
Код:
dcmd(wantedlvl, 9, cmdtext);
Код:
dcmd_wantedlvl(playerid, params[])
{
if(gTeam[playerid] == TEAM_BLUE)
{
new targetid, wanted, reason;
if(sscanf(params, "udz", targetid, wanted, reason)) return SendClientMessage(playerid, COLOR_RED, "USAGE: /setwanted (id) (wanted-level) (reason)");
else if(targetid == INVALID_PLAYER_ID) return SendClientMessage(playerid, COLOR_RED, "Invalid ID");
else if(wanted < 7)
{
new playername[MAX_PLAYER_NAME], targetname[MAX_PLAYER_NAME], string[256];
GetPlayerName(playerid, playername, sizeof(playername));
GetPlayerName(targetid, targetname, sizeof(targetname));
SetPlayerWantedLevel(targetid, wanted);
format(string, sizeof(string), "%s(%d) has set your wanted to %d because %s", playername, playerid, wanted, reason);
SendClientMessage(targetid, COLOR_LIGHTGREEN, string);
format(string, sizeof(string), "You has set %s(%d) wanted to %d because %s", targetname, targetid, wanted, reason);
SendClientMessage(playerid, COLOR_LIGHTGREEN, string);
return 1;
}
else SendClientMessage(playerid, COLOR_RED,"USAGE: Minimum 0 || Maximum 6");
return 1;
}
return 0;
}


Readed some guides etc but aint readed bout this anything wrong with my script why dosnt it work ?