Help again - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (
https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Help again (
/showthread.php?tid=173117)
Help again -
FireCat - 01.09.2010
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
Re: Help again -
LarzI - 01.09.2010
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;
}