Posts: 3,351
Threads: 780
Joined: Jan 2010
Hi all,how to set a car health by a command?
Example: /setcarhealth 0-100
Thanks
Posts: 3,351
Threads: 780
Joined: Jan 2010
I dont use dcmd or zcmd
Posts: 844
Threads: 32
Joined: Apr 2009
Reputation:
0
Then, either go use it or use strtok + strval
zcmd + sscanf is fastest even though i'd rather
dcmd + sscanf since dcmd is just a line and zcmd a include/plugin (dno)
strcmp + strtok = hmm... a long alternative.
Posts: 6,129
Threads: 36
Joined: Jan 2009
Quote:
Originally Posted by Mike_Peterson
Then, either go use it or use strtok + strval
zcmd + sscanf is fastest even though i'd rather
dcmd + sscanf since dcmd is just a line and zcmd a include/plugin (dno)
strcmp + strtok = hmm... a long alternative.
|
Ignorance is bliss.
zcmd is
easier to use in comparison to dcmd. You don't need to calculate the length of a command name, have a lengthy OnPlayerCommandText to declare your commands or anything. You just need to include zcmd and create a command like so:
pawn Код:
CMD:lol(playerid, params[]) {
return 1;
}
Posts: 844
Threads: 32
Joined: Apr 2009
Reputation:
0
I know Zcmd is better then dcmd but when ur used to dcmd its easier, but zcmd isnt a big difference.... replace dcmd_ into CMD: so idont get it why i aint using it xD
since short i begin using sscanf, before i always used strval
Posts: 3,351
Threads: 780
Joined: Jan 2010
Quote:
Originally Posted by MadeMan
What do you use then?
|
The normal command code..
Код:
if(strcmp(cmdtext, "/command", true) == 0)
{
ETC
return true;
}