Help again
#1

ok i went to see the sa-mp wiki tutorials for lock/unlock car and i got it working but only a small problem
when i put /lock or /unlock it spams the chat for that player O.o the code is:
Код:
if(!strcmp(cmdtext,"/lock",true))
    {
        if(!IsPlayerInAnyVehicle(playerid)) return SendClientMessage(playerid,0xFFFFFFAA,"Error: You have to be inside a vehicle.");
        for(new i=0; i < MAX_PLAYERS; i++)
        {
            if(i == playerid) continue;
            SendClientMessage(playerid,0xFFFFFFAA,"You have locked your car");
            SetVehicleParamsForPlayer(GetPlayerVehicleID(playerid),i,0,1);
        }
		return 1;
	}
help me out
_______________________
My jobs HCatcher
1-3$ fix warnings 1-5$fix errors
6-15$ make gamemodes(not roleplay) 3-10$ make filterscripts-scriptfiles
Dont ASK! me RolePlay questions
www.mefreeroam.tk
Reply
#2

pawn Код:
if(!strcmp(cmdtext,"/lock",true))
{
        if(!IsPlayerInAnyVehicle(playerid)) return SendClientMessage(playerid,0xFFFFFFAA,"Error: You have to be inside a vehicle.");
    for(new i=0; i < MAX_PLAYERS; i++)
    {
        if(i == playerid) continue;
        SetVehicleParamsForPlayer(GetPlayerVehicleID(playerid),i,0,1);
    }
    SendClientMessage(playerid,0xFFFFFFAA,"You have locked your car");
    return 1;
}
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)