SA-MP Forums Archive
[Pedido] Carros VIPS - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: Non-English (https://sampforum.blast.hk/forumdisplay.php?fid=9)
+--- Forum: Languages (https://sampforum.blast.hk/forumdisplay.php?fid=33)
+---- Forum: Português/Portuguese (https://sampforum.blast.hk/forumdisplay.php?fid=34)
+---- Thread: [Pedido] Carros VIPS (/showthread.php?tid=288750)



[Pedido] Carros VIPS - Scripter123456 - 08.10.2011

Alguem sabe como crio em uma parte do meu GM, carros para certos Niks (Os vips) ,Tipo os da policia so que й entra.


Re: [Pedido] Carros VIPS - Dolby - 08.10.2011

pawn Код:
OnPlayerEnterVehicle(...
{
new name[MAX_PLAYER_NAME];
if(GetPlayerName(playerid, name, 24) == Scripter123456) return RemovePlayerFromVehicle(playerid);
return 1;
}
Seria +/- Isso?


Re: [Pedido] Carros VIPS - Scripter123456 - 08.10.2011

Код:
   if(vId==VipCar[1])
	    	{
                 if(vehEngine[vId] == 0)
                 {

                      GetPlayerName(playerid, nome, sizeof nome);
                      if(strfind(nome, "Dogao_Fernandes", true) == 0)
                      {
		                  TogglePlayerControllable(playerid, 1);
		                  vehEngine[vId] = 1;
		                  format(string, 256, "%s, ligou o veнculo.",sendername);
			              ProxDetector(20.0,playerid,string,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
		                  return 1;
		              }
		              else
	                  {
                          TogglePlayerControllable(playerid, 0);
                          SendClientMessage(playerid, COLOR_GRAD1,"Vocк nгo tem as chaves desse veiculo. ");
                          return 1;
	                  }
	             }
	             else
	             {
                      if(strfind(nome, "Dogao_Fernandes", true) == 0)
                      {
                          TogglePlayerControllable(playerid, 0);
		                  vehEngine[vId] = 0;
		                  format(string, 256, "%s, desligou o veнculo.",sendername);
			              ProxDetector(20.0,playerid,string,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
		                  return 1;
		              }
                      else
					  {
                          SendClientMessage(playerid, COLOR_GRAD1,"Vocк nгo tem as chaves, para desligar esse veiculo.");
                          TogglePlayerControllable(playerid, 1);
                          return 1;
                      }
	             }
            }
Tipo assim mais nao й so isso ne.


Re: [Pedido] Carros VIPS - WLSF - 08.10.2011

Quote:
Originally Posted by Scripter123456
Посмотреть сообщение
Код:
   if(vId==VipCar[1])
	    	{
                 if(vehEngine[vId] == 0)
                 {

                      GetPlayerName(playerid, nome, sizeof nome);
                      if(strfind(nome, "Dogao_Fernandes", true) == 0)
                      {
		                  TogglePlayerControllable(playerid, 1);
		                  vehEngine[vId] = 1;
		                  format(string, 256, "%s, ligou o veнculo.",sendername);
			              ProxDetector(20.0,playerid,string,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
		                  return 1;
		              }
		              else
	                  {
                          TogglePlayerControllable(playerid, 0);
                          SendClientMessage(playerid, COLOR_GRAD1,"Vocк nгo tem as chaves desse veiculo. ");
                          return 1;
	                  }
	             }
	             else
	             {
                      if(strfind(nome, "Dogao_Fernandes", true) == 0)
                      {
                          TogglePlayerControllable(playerid, 0);
		                  vehEngine[vId] = 0;
		                  format(string, 256, "%s, desligou o veнculo.",sendername);
			              ProxDetector(20.0,playerid,string,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
		                  return 1;
		              }
                      else
					  {
                          SendClientMessage(playerid, COLOR_GRAD1,"Vocк nгo tem as chaves, para desligar esse veiculo.");
                          TogglePlayerControllable(playerid, 1);
                          return 1;
                      }
	             }
            }
Tipo assim mais nao й so isso ne.
vocк quer usar strfind em todos os Nicks apenas pra identificar se eles sгo donos de um carro?