10.08.2018, 11:34
I made a zcmd command and one public OnPlayerCommandText();.
Commands from OnPlayerCommandText doesn't work but the ZCMD commands works.
I want to make OnPlayerCommandText commands work too.
Index:
public OnPlayerCommandText(playerid, cmdtext[])
{
if (strcmp("/000", cmdtext, true) == 0){
{
SetTimer("---", 100, 0);
}
return 1;
}
Finish:
if (strcmp("/fuck", cmdtext, true) == 0){
SetPlayerScore(playerid, -1);
}
return 1;
}
stock GetName(playerid) {
new name[MAX_PLAYER_NAME];
GetPlayerName(playerid, name, sizeof(name));
return name;
}
CMD:bonus(playerid, params[]) {
new string[128], rand = 1000 + random(8000);
format(string, sizeof(string), "Felicitari %s. Ai castigat $%d.", GetName(playerid), rand);
SendClientMessage(playerid, 0x4AAB1DFF, string);
GivePlayerMoney(playerid, rand);
return 1;
}
anything wrong? i hidden some with - cuz of privacy
Commands from OnPlayerCommandText doesn't work but the ZCMD commands works.
I want to make OnPlayerCommandText commands work too.
Index:
public OnPlayerCommandText(playerid, cmdtext[])
{
if (strcmp("/000", cmdtext, true) == 0){
{
SetTimer("---", 100, 0);
}
return 1;
}
Finish:
if (strcmp("/fuck", cmdtext, true) == 0){
SetPlayerScore(playerid, -1);
}
return 1;
}
stock GetName(playerid) {
new name[MAX_PLAYER_NAME];
GetPlayerName(playerid, name, sizeof(name));
return name;
}
CMD:bonus(playerid, params[]) {
new string[128], rand = 1000 + random(8000);
format(string, sizeof(string), "Felicitari %s. Ai castigat $%d.", GetName(playerid), rand);
SendClientMessage(playerid, 0x4AAB1DFF, string);
GivePlayerMoney(playerid, rand);
return 1;
}
anything wrong? i hidden some with - cuz of privacy