STRCMP takes 2 seconds comparing a string with other.
#2

Yes the way to make it faster is to do
pawn Код:
else
        {
            SendFMessage(playerid, COLOR_LIGHTRED, "  This car is owned by %s. You can't use it", VehicleInfo[vehicleid][Owner]);
            RemovePlayerFromVehicle(playerid);
            new Float:Pos[3];
            GetPlayerPos(playerid, Pos[0], Pos[1],Pos[2]);
            SetPlayerPos(playerid, Pos[0], Pos[1],Pos[2]+5);
        }
Although strcmp doesnt take two seconds to compare a string, the function that is "slower" is RemovePlayerFromVehicle.

Quote:
Originally Posted by Red_Dragon.
Посмотреть сообщение
Use a faster, easier and more efficient command processor. I recommend using zcmd or y_commands.
He doesnt want to make a command, he only wants to check if the player's vehicle is on his own.
Reply


Messages In This Thread
STRCMP takes 2 seconds comparing a string with other. - by Magic_Time - 31.07.2013, 02:06
Respuesta: STRCMP takes 2 seconds comparing a string with other. - by JustBored - 31.07.2013, 02:10
Re: STRCMP takes 2 seconds comparing a string with other. - by SimonItaly - 31.07.2013, 02:12
Re: Respuesta: STRCMP takes 2 seconds comparing a string with other. - by Magic_Time - 31.07.2013, 02:20
Re: STRCMP takes 2 seconds comparing a string with other. - by Stereotype - 31.07.2013, 03:26

Forum Jump:


Users browsing this thread: 4 Guest(s)