SA-MP Forums Archive
Dcmd problem - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Dcmd problem (/showthread.php?tid=275746)



Dcmd problem[UNSOLVED] - Zonoya - 10.08.2011

Hey Guys i am trying to make a OnDuty and OffDuty Command for my server ill show u wut i have so far

pawn Код:
dcmd_onduty(playerid,params[])
{
    #pragma unused params
    if (AccInfo[playerid][Level] >= 1)
    {
    sendCommandToAdmins)playerid,"onduty");
    new pName[MAX_PLAYER_NAME];
    new string[128];
    GetPlayerName(playerid,pName,MAX_PLAYER_NAME);
    format(string, sizeof(string), "%s is Now On Admin Duty",pName);
    SendClientMessageToAll(COLOR_YELLOW, string);
    SetMarkerForPlayer( i, playerid, 0x800080AA);
}
    else
    SendClientMessage(playerid, COLOR_YELLOW,"You Are Not A Admin.");
}

dcmd_offduty(playerid,params[])
{
    #pragma unused params
    if (AccInfo[playerid][Level] >= 1)
    {
    sendCommandToAdmins)playerid,"offduty");
    new pName[MAX_PLAYER_NAME];
    new string[128];
    GetPlayerName(playerid,pName,MAX_PLAYER_NAME);
    format(string, sizeof(string), "%s Is Now Off Admin Duty",pName);
    SendClientMessageToAll(COLOR_YELLOW, string);
    SetMarkerForPlayer( i, playerid, 0xFFFFFFAA);
}
    else
    SendClientMessage(playerid, COLOR_YELLOW,"You Are Not A Admin.");
}
and when i try to compile it this is what i get

pawn Код:
C:\DOCUME~1\Phoebe\Desktop\GTASAC~1\SAMP03~1\FILTER~1\LuxAdmin.pwn(11211) : warning 203: symbol is never used: "dcmd_offduty"
C:\DOCUME~1\Phoebe\Desktop\GTASAC~1\SAMP03~1\FILTER~1\LuxAdmin.pwn(11211) : warning 203: symbol is never used: "dcmd_onduty"
Pawn compiler 3.2.3664          Copyright (c) 1997-2006, ITB CompuPhase


2 Warnings.
Can Anyone Help me with this

Thanks In Advance
Regards
[Nuclear]Phoebe


Re: Dcmd problem - Kingunit - 10.08.2011

Those things are warnings, means you can use the script still.
But what is line '11211' probably you need to remove that line.


Re: Dcmd problem - Zonoya - 10.08.2011

line 11211 is the line at the very end with nothing on but i need the warnings to go else i cant use that Command and i want the command


Re: Dcmd problem - Vince - 10.08.2011

Quote:
Originally Posted by Kingunit
Посмотреть сообщение
Those things are warnings, means you can use the script still.
Bad habit, because the only thing you get is a bugged script.

On topic: You need to add the commands under OnPlayerCommandText as well if you use dcmd.

pawn Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
    dcmd(onduty, 6, cmdtext);
    dcmd(offduty, 7, cmdtext);
    return 0;
}



Re: Dcmd problem - Zonoya - 10.08.2011

but i have sth to say im adding this to the LuxAdmin Script and the Dcmds work there but not mine


Re: Dcmd problem - Zonoya - 10.08.2011

this script wouldn't work with Strcmp so i changed it to Dcmd but i need my script correcting

This Forum Requires that you wait 120 seconds between posts. please try again in 1 second. xD oh how that pisses me off


Re: Dcmd problem - Zonoya - 11.08.2011

im gonna revive this as i need help pleaseeeee


Re: Dcmd problem - Kingunit - 11.08.2011

Quote:
Originally Posted by Vince
Посмотреть сообщение
Bad habit, because the only thing you get is a bugged script.

On topic: You need to add the commands under OnPlayerCommandText as well if you use dcmd.

pawn Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
    dcmd(onduty, 6, cmdtext);
    dcmd(offduty, 7, cmdtext);
    return 0;
}
Where I've said that's is good for your script? Didn't you saw my last line what I wrote in that comment?


Re: Dcmd problem - Zonoya - 11.08.2011

ive tried all ur ideas none work


Re: Dcmd problem - Kingunit - 11.08.2011

Try this:
pawn Код:
dcmd_onduty(playerid,params[])
{
    #pragma unused params
    if (AccInfo[playerid][Level] >= 1)
    {
    sendCommandToAdmins(playerid, "onduty");
    new pName[MAX_PLAYER_NAME];
    new string[128];
    GetPlayerName(playerid,pName,MAX_PLAYER_NAME);
    format(string, sizeof(string), "%s is Now On Admin Duty",pName);
    SendClientMessageToAll(COLOR_YELLOW, string);
    SetMarkerForPlayer( i, playerid, 0x800080AA);
}
    else
    SendClientMessage(playerid, COLOR_YELLOW,"You Are Not A Admin.");
}

dcmd_offduty(playerid,params[])
{
    #pragma unused params
    if (AccInfo[playerid][Level] >= 1)
    {
    sendCommandToAdmins(playerid, "offduty");
    new pName[MAX_PLAYER_NAME];
    new string[128];
    GetPlayerName(playerid,pName,MAX_PLAYER_NAME);
    format(string, sizeof(string), "%s Is Now Off Admin Duty",pName);
    SendClientMessageToAll(COLOR_YELLOW, string);
    SetMarkerForPlayer( i, playerid, 0xFFFFFFAA);
}
    else
    SendClientMessage(playerid, COLOR_YELLOW,"You Are Not A Admin.");
}