need help with lock
#5

Quote:
Originally Posted by MenaceX^
Quote:
Originally Posted by OmeRinG
I know it's kinda off-topic but you wrote too many lines! and made things that could lag your server....
just do this:
pawn Код:
if (!strcmp(cmdtext, "/lock", true))
{
    if(!IsPlayerInAnyVehicle(playerid)) return SendClientMessage(playerid, COLOR_GREY, "You're not in a vehicle!");
    if(GetPlayerState(playerid) != PLAYER_STATE_DRIVER) return SendClientMessage(playerid,COLOR_GREY,"You can only lock the doors as the driver.");
    SetVehicleParamsForPlayer(GetPlayerVehicleID(playerid),playerid, 0, 1);
    SendClientMessage(playerid, COLOR_GREY, "Vehicle locked!");
    PlayerPlaySound(playerid,1056,0,0,0);
    return 1;
}
It's not really can lag his server..
He made a for loop just to check if i equals playerid.....
Reply


Messages In This Thread
need help with lock - by oreniko - 16.04.2009, 09:50
Re: need help with lock - by 56avenue - 16.04.2009, 09:52
Re: need help with lock - by OmeRinG - 16.04.2009, 10:03
Re: need help with lock - by MenaceX^ - 16.04.2009, 10:10
Re: need help with lock - by OmeRinG - 16.04.2009, 10:14
Re: need help with lock - by Weirdosport - 16.04.2009, 11:02

Forum Jump:


Users browsing this thread: 2 Guest(s)