16.08.2012, 15:54
PHP код:
public OnPlayerCommandText(playerid, cmdtext[])
{
if (strcmp("/help", cmdtext, true, 10) == 0)
{
SendClientMessage(playerid, 0x33AA33AA, "|_____________________________GENERAL HELP_______________________________________|");
SendClientMessage(playerid, 0xFFFFFFAA, "[CHAT]:/b /g(OOC) /low /s(Shout) /d(Donator) /w(Whisper) /me /do /pm");
SendClientMessage(playerid, 0xFFFFFFAA, "[IGHELP]:/admins /helpers /ask /report");
SendClientMessage(playerid, 0xFFFFFFAA, "[ATM]:/withdraw /deposit /checkbalance");
SendClientMessage(playerid, 0xFFFFFFAA, "[GENERAL]:/enter(To enter places) /exit(to exit places) /animhelp /coin /windows");
SendClientMessage(playerid, 0xFFFFFFAA, "[GENERAL]:/stats /vampirehelp /admins /v /wolfhelp /collegehelp /cellphonehelp /dice");
SendClientMessage(playerid, 0xFFFFFFAA, "[GENERAL]:/hh /househelp /charity /pay /clearchat /dropgun /buyitems /buyaccessories");
SendClientMessage(playerid, 0xFFFFFFAA, "[JOBS]: /fishinghelp /teaherhelp");
SendClientMessage(playerid, 0x33AA33AA, "|________________________________________________________________________________|");
return 1;
}
else if (strcmp("/dropgun", cmdtext, true, 10) == 0)
{
new weaponid = GetPlayerWeapon(playerid);
GivePlayerWeapon(playerid,weaponid,-1);
return 1;
}
else if (strcmp("/clearchat", cmdtext, true, 10) == 0)
{
SendClientMessage(playerid,0xFFFFFF,"");
SendClientMessage(playerid,0xFFFFFF,"");
SendClientMessage(playerid,0xFFFFFF,"");
SendClientMessage(playerid,0xFFFFFF,"");
SendClientMessage(playerid,0xFFFFFF,"");
SendClientMessage(playerid,0xFFFFFF,"");
SendClientMessage(playerid,0xFFFFFF,"");
SendClientMessage(playerid,0xFFFFFF,"");
SendClientMessage(playerid,0xFFFFFF,"");
SendClientMessage(playerid,0xFFFFFF,"");
return 1;
}
else if (strcmp("/cellphonehelp", cmdtext, true, 10) == 0)
{
SendClientMessage(playerid, 0x33AA33AA, "|___________CELLPHONE HELP________|");
SendClientMessage(playerid, 0xFFFFFFAA, "[CELLPHONEHELP]:/call /hangup");
SendClientMessage(playerid, 0x33AA33AA, "|_________________________________|");
return 1;
}
else if (strcmp("/teacherhelp", cmdtext, true, 10) == 0)
{
SendClientMessage(playerid, 0x33AA33AA, "|_____________TEACHER HELP__________|");
SendClientMessage(playerid, 0xFFFFFFAA, "[TEACHERHELP]:/startclass /endclass");
SendClientMessage(playerid, 0x33AA33AA, "|___________________________________|");
return 1;
}
if (strcmp("/househelp", cmdtext, true, 10) == 0)
{
SendClientMessage(playerid, 0x33AA33AA, "|_______________HOUSE HELP______________________|");
SendClientMessage(playerid, 0xFFFFFFAA, "[HOUSEHELP]:/enter /exit /buyhouse /sellhouse");
SendClientMessage(playerid, 0x33AA33AA, "|_______________________________________________|");
return 1;
}
if (strcmp("/charity", cmdtext, true, 10) == 0)
{
ShowPlayerDialog(playerid,100,DIALOG_STYLE_INPUT, "Charity", "How much would you like to charity", "Charity", "Close");
return 1;
}
return 0;
}