#1

CMD:armour(playerid, params[])
{
SetPlayerArmour(playerid, 100.00);
return 1;

Its a cmd to set my armour, but its not working and I actually know this is not everything, What did I forgot ?
Reply
#2

pawn Код:
CMD:armour(playerid, params[])
{
    SetPlayerArmour(playerid, 100.00);
    return 1;
}
Reply
#3

huh? whats the difference? just the last }, wich I forgot to add it in here, but thats already in my script. it doesn't work. But is that all? Don't I need to define or include or something? because its not working that cmd
Reply
#4

Quote:
Originally Posted by saffierr
Посмотреть сообщение
huh? whats the difference? just the last }, wich I forgot to add it in here, but thats already in my script. it doesn't work. But is that all? Don't I need to define or include or something? because its not working that cmd
lol. The cmd which he posted is correct. Maybe you are doing some mistake. Or your server class don't allow 100 armour.
Reply
#5

but the cmd I posted is correct, why doesn't it work then . I STARTED JUST 1DAY, MY SERVER IS CURRENTLY STILL GRAND LARC. maybe due to that?
Reply
#6

Quote:
Originally Posted by saffierr
Посмотреть сообщение
but the cmd I posted is correct, why doesn't it work then . I STARTED JUST 1DAY, MY SERVER IS CURRENTLY STILL GRAND LARC. maybe due to that?
Did you defined ZCMD include in the gamemode ?

and if not than add this in the top of the script

pawn Код:
#include <zcmd>
Reply
#7

Lolz, yep I did.
So? what is it?
Reply
#8

Please help, what is it? Why doesn't the command work?
Quote:

public OnPlayerCommandText(playerid, cmdtext[])
{
if (strcmp("/mycommand", cmdtext, true, 10) == 0)
{
// Do something here
return 1;
}
return 0;
}

CMD:heal(playerid, params[])
{
SetPlayerHealth(playerid, 100.00);
return 1;
}
CMD:armour(playerid, params[])
{
SetPlayerArmour(playerid, 100.00);
return 1;
}
CMD:repair(playerid, params[])
{
if (IsPlayerInAnyVehicle(playerid)) return SendClientMessage(playerid, -1, "ERROR: You're not in a vehicle.");
RepairVehicle(GetPlayerVehicleID(playerid));
return 1;
}

None of them works
Reply
#9

Change
pawn Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
if (strcmp("/mycommand", cmdtext, true, 10) == 0)
{
// Do something here
return 1;
}
return 0;
}
To

pawn Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
    return 1;
}
Reply
#10

I did, still the cmds are not working IG, but I think, Why would the cmds work if I never write somewhere in the pawno /repair /heal /armour.
Quote:

public OnPlayerCommandText(playerid, cmdtext[])
{
return 1;
}

CMD:heal(playerid, params[])
{
SetPlayerHealth(playerid, 100.00);
return 1;
}
CMD:armour(playerid, params[])
{
SetPlayerArmour(playerid, 100.00);
return 1;
}
CMD:repair(playerid, params[])
{
if (IsPlayerInAnyVehicle(playerid)) return SendClientMessage(playerid, -1, "ERROR: You're not in a vehicle.");
RepairVehicle(GetPlayerVehicleID(playerid));
return 1;
}

EDIT: Yep the cmds works lolz, I forgot to login as a admin. so yep thank you for help. but 1thing, when I am not in a car it doesn't say ERROR:You're not in a car. why?
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)