Posts: 267
Threads: 64
Joined: Jul 2010
Reputation:
0
Hi,
There is more fast that 'strcmp' because I use a command with:
strcmp(playername, HouseInfo[PlayerInfo[playerid][pPhousekey]][hOwner], true) == 0)
it's no at once, result after 0.5 sc.
Thanks
Posts: 772
Threads: 52
Joined: Aug 2010
Reputation:
0
1. Zcmd (fast & easy to use)
2. Dcmd (slowest but faster then strcmp & easy to use)
3. Ycmd (fastest but a little harder to use)
Use the search button to search for them.
Posts: 267
Threads: 64
Joined: Jul 2010
Reputation:
0
Yes but Zcmd is for a command COMMAND:mycommand(playerid, params[]), here if I want to compare my name and the name house, strcmp(playername, HouseInfo[PlayerInfo[playerid][pPhousekey]][hOwner], true) == 0). How to use that?
Posts: 1,363
Threads: 14
Joined: Apr 2009
Reputation:
0
it's most likely not strcmp that's causing the lag, however if you really wanted you could assign a number to each player and index it to the house owners and then do something like this
if(PlayerID[playerid] == HouseInfo[ownerID])
Posts: 267
Threads: 64
Joined: Jul 2010
Reputation:
0
ok so inside the command, if I want to compare a string the best solution is strcmp?
Ycmd Zcmd...or sccanf can't to be used for that?
Posts: 6,236
Threads: 310
Joined: Jan 2011
Reputation:
0
YCMD and ZCMD are for command processing.
sscanf is for string, erm, scanning? It's not for comparing.
strcmp stands for string compare.