30.07.2009, 19:46
Hi, I have a little question about DCMD. I want to know how much faster DCMD is(Milliseconds)? Only for such a command:
Or
(SpawnVehicle is a function i made. It just creates a vehicle, and destroyes the other.)
And
Or
So i don't want to know that DCMD is faster, but i want to see how much faster in milliseconds
pawn Код:
if(strcmp(cmdtext, "/jetmax", true) ==0) {SpawnVehicle(playerid, 493, "Jetmax"); return 1;}
pawn Код:
dcmd_helloworld(playerid, params[])
{
#pragma unused params
SpawnVehicle(playerid, 493, "Jetmax");
return 1;
}
And
pawn Код:
if(strcmp(cmd, "/kick", true) == 0)
{
new tmp[128];
tmp = strtok(cmdtext, idx);
if(strlen(tmp) == 0) return SendClientMessage(playerid, 0xFFFFFFFF, "USAGE: /kick [playerid]");
Kick(strval(tmp));
return 1;
}
pawn Код:
dcmd_kick(playerid, params[])
{
if(!strlen(params))
{
SendClientMessage(playerid, 0xFF0000FF, "Use: /kick [playerid]");
return 1;
}
strval(params);
Kick(strval(params));
return 1;
}