14.03.2011, 06:18
(
Последний раз редактировалось Dr.Ghost; 18.03.2011 в 20:38.
)
at top of gamemode already defined:
When compiling:
pawn Код:
#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
pawn Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
dcmd(penis, 1, cmdtext);
dcmd(hpenis, 1, cmdtext);
dcmd(givepcash, 1, cmdtext);
dcmd(healme, 1, cmdtext);
dcmd(admincmd, 1, cmdtext);
dcmd(help, 1, cmdtext);
dcmd(buysawnoff, 2, cmdtext);
return 0;
}
dcmd_unban(playerid, params[])///rcon unbanip [IP]
{
SendClientMessage(playerid, COLOR_RED, "Usage: /unban [playerid]");
SendClientMessage(playerid, COLOR_PINK, "You Need To /rcon login [password] To use this Commands");
SendClientMessage(playerid, COLOR_RED, "Then /rcon unbanip [IP-HERE]");
return 1;
}
dcmd_givepcash(playerid, params[])
{
if(PlayerInfo[playerid][pAdminLevel] >= 1)
{
new toplayer, cash;
if(!sscanf(params,"ui",toplayer, cash))
{
if(IsPlayerConnected(toplayer))
{
if(cash <= 1000000)
{
new string[64];
new name[MAX_PLAYER_NAME], PlayerName[MAX_PLAYER_NAME];
GetPlayerName(playerid, name, sizeof(name));
GetPlayerName(toplayer, PlayerName, sizeof(PlayerName));
format(string, sizeof(string), "Admin %s has gave you $%d.",name, cash);
SendClientMessage(playerid, 0xFFFF00FF, string);
format(string, sizeof(string), "You have gave to %s $%d.", PlayerName, cash);
SendClientMessage(playerid, 0xFFFF00FF, string);
GivePlayerMoney(toplayer, cash);
}
else return SendClientMessage(playerid, 0xFF0000FF,"You can't give that much");
}
else return SendClientMessage(playerid, 0xFF0000FF,"This player is not online.");
}
else return SendClientMessage(playerid, 0x00FFFFFF,"Usage: /givepcash [PlayerID][Amount]");
}
else return SendClientMessage(playerid, 0xFF0000FF,"Only a Administrator TEAM 1 can use this commands.");
return 1;
}
dcmd_healme(playerid, params[])
{
if(PlayerInfo[playerid][pAdminLevel] >= 1)
{
SetPlayerHealth(playerid, 100);
SetPlayerArmour(playerid, 100);
}
else return SendClientMessage(playerid, 0xFF0000FF, "{C9FFAB}You Are Not Admin TEAM 1");
return 1;
}
dcmd_admincmd(playerid, params[])
{
if(PlayerInfo[playerid][pAdminLevel] >= 1)
{
SendClientMessage(playerid, COLOR_RED, "{FFAF00}/ban {F81414}/kick {C9FFAB}/unban {C77D87}/healme {C9FFAB}/givepcash");
}
else return SendClientMessage(playerid, 0xFF0000FF, "{C9FFAB}You Are Not Admin TEAM 1");
return 1;
}
//end
dcmd_help(playerid, params[])
{
SendClientMessage(playerid,COLOR_PINK,"{FFAF00}usage commands: {F81414}/pm /kill /about {C9FFAB}/animlist1 /animlist2 /buysawnoff");
SendClientMessage(playerid,COLOR_PINK,"{FFAF00}usage commands: {F81414}/penis =SHow your penis {C9FFAB}/hpenis = for hide penis");
SendClientMessage(playerid,COLOR_PINK,"{FFAF00}usage commands: {F81414}/shark /hshark");
SendClientMessage(playerid,COLOR_PINK,"{F3FF02}ADMINISTRATOR TEAM 1: {C77D87}/admincmd");
return 1;
}
// END COMMAND 15/3/2011
When compiling:
Код:
C:\Documents and Settings\User\Desktop\SA-MP 0.3C WINDOWS SERVER\gamemodes\[GM]DMv3.0.pwn(840) : warning 203: symbol is never used: "params" C:\Documents and Settings\User\Desktop\SA-MP 0.3C WINDOWS SERVER\gamemodes\[GM]DMv3.0.pwn(846) : warning 203: symbol is never used: "params" C:\Documents and Settings\User\Desktop\SA-MP 0.3C WINDOWS SERVER\gamemodes\[GM]DMv3.0.pwn(852) : warning 203: symbol is never used: "params" C:\Documents and Settings\User\Desktop\SA-MP 0.3C WINDOWS SERVER\gamemodes\[GM]DMv3.0.pwn(858) : warning 203: symbol is never used: "params" C:\Documents and Settings\User\Desktop\SA-MP 0.3C WINDOWS SERVER\gamemodes\[GM]DMv3.0.pwn(884) : warning 203: symbol is never used: "params" C:\Documents and Settings\User\Desktop\SA-MP 0.3C WINDOWS SERVER\gamemodes\[GM]DMv3.0.pwn(921) : warning 203: symbol is never used: "params" C:\Documents and Settings\User\Desktop\SA-MP 0.3C WINDOWS SERVER\gamemodes\[GM]DMv3.0.pwn(931) : warning 203: symbol is never used: "params" C:\Documents and Settings\User\Desktop\SA-MP 0.3C WINDOWS SERVER\gamemodes\[GM]DMv3.0.pwn(941) : warning 203: symbol is never used: "params" C:\Documents and Settings\User\Desktop\SA-MP 0.3C WINDOWS SERVER\gamemodes\[GM]DMv3.0.pwn(949) : warning 203: symbol is never used: "params" C:\Documents and Settings\User\Desktop\SA-MP 0.3C WINDOWS SERVER\gamemodes\[GM]DMv3.0.pwn(957) : warning 203: symbol is never used: "params" C:\Documents and Settings\User\Desktop\SA-MP 0.3C WINDOWS SERVER\gamemodes\[GM]DMv3.0.pwn(2131) : warning 203: symbol is never used: "dcmd_beer" C:\Documents and Settings\User\Desktop\SA-MP 0.3C WINDOWS SERVER\gamemodes\[GM]DMv3.0.pwn(2131) : warning 203: symbol is never used: "dcmd_ciggy" C:\Documents and Settings\User\Desktop\SA-MP 0.3C WINDOWS SERVER\gamemodes\[GM]DMv3.0.pwn(2131) : warning 203: symbol is never used: "dcmd_kiss" C:\Documents and Settings\User\Desktop\SA-MP 0.3C WINDOWS SERVER\gamemodes\[GM]DMv3.0.pwn(2131) : warning 203: symbol is never used: "dcmd_pee" C:\Documents and Settings\User\Desktop\SA-MP 0.3C WINDOWS SERVER\gamemodes\[GM]DMv3.0.pwn(2131) : warning 203: symbol is never used: "dcmd_sit" C:\Documents and Settings\User\Desktop\SA-MP 0.3C WINDOWS SERVER\gamemodes\[GM]DMv3.0.pwn(2131) : warning 203: symbol is never used: "dcmd_wank" Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase 16 Warnings.