problem with some commands with ZCMD
#5

did that
PHP код:
CMD:kill(playerid)
{
     
printf ("starting the cmd");
     if(
connected[playerid] == true) return GameTextForPlayer(playerid"~r~Spawn First"50005);
     
SetPlayerHealth(playerid0);
     
printf ("setting hp health to 0");
     
SendClientMessage(playerid, -1"{c3c3c3}(INFO) You have killed yourself! (-8 points, -50 respect lost!)");
     
printf ("adding some loses to player config file");
     
pInfo[playerid][Deaths]  += 1;
     
pInfo[playerid][Points]  -= 8;
     
pInfo[playerid][Respect] -= 50;
     return 
1;

I see only printf ("starting the cmd"); on server dos

EDIT:

Quote:
Originally Posted by Fratello
Посмотреть сообщение
Do you have OnPlayerCommandReceive callback?
I dont have it

EDIT: yes

PHP код:
public OnPlayerCommandPerformed(playeridcmdtext[], success)
{
    if(
connected[playerid] == true) return SendClientMessage(playerid, -1"{c3c3c3}* You can't use any commands right now, spawn first..");
    if(!
success) return SendClientMessage(playerid, -1"{c3c3c3}(INFO) Unknown command type /cmds to list all available commands");
    return 
1;
}
public 
OnPlayerCommandReceived(playeridcmdtext[])
{
  if(
InArena1[playerid] && strcmp(cmdtext,"/aleave",true) != 0)
  {
     
SendClientMessage(playerid, -1"{c3c3c3}(INFO) You can't use commands in the arena! (/aleave)");
     return 
0;
  }
  if(
InArena2[playerid] && strcmp(cmdtext,"/aleave",true) != 0)
  {
     
SendClientMessage(playerid, -1"{c3c3c3}(INFO) You can't use commands in the arena! (/aleave)");
     return 
0;
  }
  if(
IsPlayerInLobby[playerid] && strcmp(cmdtext,"/back",true) != 0)
  {
     
SendClientMessage(playerid, -1"{c3c3c3}(INFO) You can't use any commands in lobby! (/back)");
     return 
0;
  }
  return 
1;

Included on player command performed and received
Reply


Messages In This Thread
problem with some commands with ZCMD - by wallen - 28.02.2018, 16:06
Re: problem with some commands with ZCMD - by Sew_Sumi - 28.02.2018, 16:14
Re: problem with some commands with ZCMD - by wallen - 28.02.2018, 16:24
Re: problem with some commands with ZCMD - by Fratello - 28.02.2018, 16:42
Re: problem with some commands with ZCMD - by wallen - 28.02.2018, 16:43
Re: problem with some commands with ZCMD - by Fratello - 28.02.2018, 16:45
Re: problem with some commands with ZCMD - by ISmokezU - 28.02.2018, 17:04
Re: problem with some commands with ZCMD - by Hunud - 28.02.2018, 17:20

Forum Jump:


Users browsing this thread: 4 Guest(s)