SA-MP Forums Archive
Seat Belt bugged? - 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: Seat Belt bugged? (/showthread.php?tid=150193)



Seat Belt bugged? - Mechscape - 25.05.2010

Код:
	if(strcmp(cmd, "/kontrollivццd", true) == 0)
	{
  	tmp = strtok(cmdtext, idx);
	  if(!strlen(tmp))
  	{
    	SendClientMessage(playerid, COLOR_GREY, "INFO: /kontrollivццd [MдngijaID/Osanimest]");
    	return 1;
   	}
  	new playa;
	  if(strlen(tmp))
	  {
    	playa = ReturnUser(tmp);
   	}
  	else
  	{
    	playa = strval(tmp);
	  }
    if(GetPlayerState(playa) == PLAYER_STATE_ONFOOT)
    {
    	SendClientMessage(playerid,COLOR_GREY,"Mдngija pole sхidukis.");
  	    return 1;
	  }
    GetPlayerName(playa, giveplayer, sizeof(giveplayer));
   	GetPlayerName(playerid, sendername, sizeof(sendername));
    if(PlayerInfo[playerid][pMember] != 1 && PlayerInfo[playerid][pLeader] != 1)
   	{
	    SendClientMessage(playerid,COLOR_GREY,"Sa pole politsei!");
    	return 1;
  	}
  	if(ProxDetectorS(35.0, playerid, giveplayerid))
   	{
      new stext[255];
      if(PlayerInfo[playa][pSeatBelt] == 0) { stext = "eemaldatud"; }
      else if(PlayerInfo[playa][pSeatBelt] == 1) { stext = "peal"; }
     	format(string, sizeof(string), "%s turvavцц on hetkel %s." , giveplayer , stext);
      SendClientMessage(playerid,COLOR_WHITE,string);
      new string2[255];
     	format(string2, sizeof(string2), "* %s kontrollib et kas %s on turvavцц asetatud.", sendername ,giveplayer);
    	ProxDetector(30.0, playerid, string2, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
		}
		else
		{
			SendClientMessage(playerid, COLOR_GREY, "Sa ei ole kodaniku lдheduses!");
		}
		return 1;
	}
I do /kontrollivццd (id) then doenst it thing's or something. (No text commin, bla bla)


Re: Seat Belt bugged? - Mechscape - 25.05.2010

?


Re: Seat Belt bugged? - [MWR]Blood - 25.05.2010

We can't understand, explain better please.


Re: Seat Belt bugged? - Mechscape - 25.05.2010

Like you are near me, then i do /kontrollivццd [yourid] (/checkseatbelt [id]) then doens't show it her/his got seat belt on/off. Just nothing...


Re: Seat Belt bugged? - DJDhan - 25.05.2010

You have many return 1's i the code, maybe after the loop it's not going ahead?


Re: Seat Belt bugged? - Mechscape - 24.06.2010

Hmm, need help!

We was testing. He is admin and me is admin. He did /sealtbealt (on seatbelt) and i did /checkseatbelt, says its on. WORKED!

But doenst work with another players (without admins)