09.12.2012, 22:23
Quote:
Can you show us the script / part of the script with some commands?
|
pawn Код:
public OnPlayerCommandReceived(playerid, cmdtext[])
{
if(!PlayerIsLoggedIn[playerid]){
SendClientMessage(playerid, -1, "Please log in!");
return -1;
}
return 1;
}
pawn Код:
YCMD:commands(playerid, params[], help)
{
if ( help ) return SendClientMessage(playerid, -1, "Shows the command list");
new count = Command_GetPlayerCommandCount( playerid ), cmd[32];
for ( new i = 0; i != count; ++i){
format(cmd, sizeof(cmd), "/%s ", Command_GetNext ( i, playerid ));
SendClientMessage(playerid, -1, cmd);
}
return 1;
}
pawn Код:
public OnPlayerCommandPerformed(playerid, cmdtext[], success){
switch (success)
{
case 1:
{
return 1;
}
case -1:
{
return 0;
}
case 0:
{
SendClientMessage(playerid, -1, "Command not found, please use /commands to display the command list.");
return 1;
}
default:
return -1;
}
return 1;
}