Script problem [need help its easy]
#1

Hi, i did an command to fix the car, (RepairVerhicle)
But, everytime i write like a command that dosent exist like /kaposdkpoasd it sais you have repaired your vehicle, even if there's no command like that or if i write wrong like /vfiiza instead of /vfix it still sais you have repaired your car, it dosent matter if i'm in the car or not, even if imin it dosent repair itself, but if i write /vfix it works, but anyway whats wrong why does it say you've repaired yourevhcile?
help! =)
Reply
#2

Some code would be fine ^^
It's probably missing a return value or something like that :O
Reply
#3

Код:
if(strcmp("/repair",cmdtext, true, 10) == 0) {
new veh;
veh = GetPlayerVehicleID(playerid);
if(IsPlayerInAnyVehicle(playerid)) {
RepairVehicle(GetPlayerVehicleID(playerid));
}
else {
SendClientMessage(playerid,Color,"vc nao esta num veiculo..");
}
return 1;
}
Reply
#4

The code looks correct =D
So the problem must be somewhere else.

Try to use /* and */ to exclude this code, just to be sure that it's really the fault of that command.
Reply
#5

I don't know if it could be a problem, but I post it anyway...

pawn Код:
if(strcmp("/repair",cmdtext, true, 10) == 0)
The '10' indicates the amount of tokens? Maybe it need to be changed to '7'. I hope that works
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)