22.01.2012, 23:33
To tentando criar comando em dcmd mais ta dificil
Seguindo essa video aula -> [ame]http://www.youtube.com/watch?v=MsRXm7zAkfc&feature[/ame]
No topo
OnPlayerCommand
Final do GM
Compilo da certo.
/life
Unknown command.
Seguindo essa video aula -> [ame]http://www.youtube.com/watch?v=MsRXm7zAkfc&feature[/ame]
No topo
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(life, 4, cmdtext);
return 1;
}
pawn Код:
dcmd_life(playerid, params[])
{
#pragma unused params
SetPlayerHealth(playerid, 100);
SendClientMessage(playerid, -1, "Vocк recebeu 100 de life .-.");
return 1;
}
/life
Unknown command.