[Ajuda] FS de Tunar
#1

Baixei uns FS de tunar aqui no fуrum pro meu server RPG, o problema й que esse FS funciona em qualquer lugar, basta digitar /tunar, eu gostaria de colocar esse FS pra funcionar apenas na coordenada que eu selecionar e nгo em qualquer lugar, alguйm sabe me ajudar?
Reply
#2

IsPlayerInRangeOfPoint
Reply
#3

nгo consegui Chis, coloquei o cуdigo dessa forma:

Код:
	if(strcmp(cmdtext, "/tunar", true) == 0)
{
    if(IsPlayerInRangeOfPoint(playerid, 7.0, 2771.3865, -1606.4147,10.9219))
    {
        SendClientMessage(playerid,0xFFFFFFFF,"Vocк nгo estб em um local de tuning!");
    }
    return 1;
o comando realmente sу funciona na coordenada que selecionei, o problema й que em vez de abrir o menъ de tunar, ele envia a mensagem "Vocк nгo estб em um local de tuning!".
Reply
#4

No lugar do sendClientMessage vocк tem que colocar a funзгo do tunar
se nгo souber poste o comando /tunar
Reply
#5

pawn Код:
if(strcmp(cmdtext, "/tunar", true) == 0)
{
    if (PlayerToPoint(15.0, playerid, X,Y,Z))//Coloque as Cordenadas em X,Y,Z
    {
        SendClientMessage(playerid,0xFFFFFFFF,"Vocк nгo estб em um local de tuning!");
    }
    return 1;
Espero ter Ajudado !
Reply
#6

bombomloko coloque a funзгo do IsPlayerInRangeOfPoint no comando de tunar no FS, jб que nгo estб no seu GM ._.
Reply
#7

ainda nгo consegui
em resposta ao Chis:

Код:
	if(strcmp(cmdtext, "/tunar", true) == 0)
  {
	new playerstate = GetPlayerState(playerid);
	new playername[MAX_PLAYER_NAME];
	GetPlayerName(playerid,playername,sizeof(playername));

 if(!IsPlayerInAnyVehicle(playerid)){

	SendClientMessage(playerid,COLOR_WHITE,"[INFO] Voce nao esta em um carro.");

	return 1;
}
else
{
    if(playerstate != PLAYER_STATE_DRIVER){
	SendClientMessage(playerid,COLOR_YELLOW,"[INFO] Voce nao e um mecanico de carro ou voce nao esta no carro como excitador!");


 return 1;

}
else
{


       if(GetVehicleModel(GetPlayerVehicleID(playerid)) == 562 ||
		GetVehicleModel(GetPlayerVehicleID(playerid)) == 565 ||
		GetVehicleModel(GetPlayerVehicleID(playerid)) == 559 ||
		GetVehicleModel(GetPlayerVehicleID(playerid)) == 561 ||
		GetVehicleModel(GetPlayerVehicleID(playerid)) == 560 ||
		GetVehicleModel(GetPlayerVehicleID(playerid)) == 575 ||
		GetVehicleModel(GetPlayerVehicleID(playerid)) == 534 || // Broadway
		GetVehicleModel(GetPlayerVehicleID(playerid)) == 567 ||
		GetVehicleModel(GetPlayerVehicleID(playerid)) == 536 ||
		GetVehicleModel(GetPlayerVehicleID(playerid)) == 535 ||
		GetVehicleModel(GetPlayerVehicleID(playerid)) == 576 ||
		GetVehicleModel(GetPlayerVehicleID(playerid)) == 411 ||
		GetVehicleModel(GetPlayerVehicleID(playerid)) == 579 ||
		GetVehicleModel(GetPlayerVehicleID(playerid)) == 597 ||
		GetVehicleModel(GetPlayerVehicleID(playerid)) == 602 ||
		GetVehicleModel(GetPlayerVehicleID(playerid)) == 496 ||
		GetVehicleModel(GetPlayerVehicleID(playerid)) == 518 ||
		GetVehicleModel(GetPlayerVehicleID(playerid)) == 527 ||
		GetVehicleModel(GetPlayerVehicleID(playerid)) == 589 ||
		GetVehicleModel(GetPlayerVehicleID(playerid)) == 597 ||
		GetVehicleModel(GetPlayerVehicleID(playerid)) == 419 ||
		GetVehicleModel(GetPlayerVehicleID(playerid)) == 533 ||
		GetVehicleModel(GetPlayerVehicleID(playerid)) == 526 ||
		GetVehicleModel(GetPlayerVehicleID(playerid)) == 474 ||
		GetVehicleModel(GetPlayerVehicleID(playerid)) == 545 ||
		GetVehicleModel(GetPlayerVehicleID(playerid)) == 517 ||
		GetVehicleModel(GetPlayerVehicleID(playerid)) == 410 ||
		GetVehicleModel(GetPlayerVehicleID(playerid)) == 600 ||
		GetVehicleModel(GetPlayerVehicleID(playerid)) == 436 ||
		GetVehicleModel(GetPlayerVehicleID(playerid)) == 580 ||
		GetVehicleModel(GetPlayerVehicleID(playerid)) == 439 ||
		GetVehicleModel(GetPlayerVehicleID(playerid)) == 549 ||
		GetVehicleModel(GetPlayerVehicleID(playerid)) == 491 ||
		GetVehicleModel(GetPlayerVehicleID(playerid)) == 445 ||
		GetVehicleModel(GetPlayerVehicleID(playerid)) == 604 ||
		GetVehicleModel(GetPlayerVehicleID(playerid)) == 507 ||
		GetVehicleModel(GetPlayerVehicleID(playerid)) == 585 ||
		GetVehicleModel(GetPlayerVehicleID(playerid)) == 587 ||
		GetVehicleModel(GetPlayerVehicleID(playerid)) == 466 ||
		GetVehicleModel(GetPlayerVehicleID(playerid)) == 492 ||
		GetVehicleModel(GetPlayerVehicleID(playerid)) == 546 ||
		GetVehicleModel(GetPlayerVehicleID(playerid)) == 551 ||
		GetVehicleModel(GetPlayerVehicleID(playerid)) == 516 ||
		GetVehicleModel(GetPlayerVehicleID(playerid)) == 467 ||
		GetVehicleModel(GetPlayerVehicleID(playerid)) == 426 ||
		GetVehicleModel(GetPlayerVehicleID(playerid)) == 547 ||
		GetVehicleModel(GetPlayerVehicleID(playerid)) == 405 ||
		GetVehicleModel(GetPlayerVehicleID(playerid)) == 409 ||
		GetVehicleModel(GetPlayerVehicleID(playerid)) == 550 ||
		GetVehicleModel(GetPlayerVehicleID(playerid)) == 566 ||
		GetVehicleModel(GetPlayerVehicleID(playerid)) == 540 ||
		GetVehicleModel(GetPlayerVehicleID(playerid)) == 421 ||
		GetVehicleModel(GetPlayerVehicleID(playerid)) == 529 ||
		GetVehicleModel(GetPlayerVehicleID(playerid)) == 431 ||
		GetVehicleModel(GetPlayerVehicleID(playerid)) == 438 ||
		GetVehicleModel(GetPlayerVehicleID(playerid)) == 437 ||
		GetVehicleModel(GetPlayerVehicleID(playerid)) == 420 ||
		GetVehicleModel(GetPlayerVehicleID(playerid)) == 525 ||
		GetVehicleModel(GetPlayerVehicleID(playerid)) == 552 ||
		GetVehicleModel(GetPlayerVehicleID(playerid)) == 416 ||
		GetVehicleModel(GetPlayerVehicleID(playerid)) == 433 ||
		GetVehicleModel(GetPlayerVehicleID(playerid)) == 427 ||
		GetVehicleModel(GetPlayerVehicleID(playerid)) == 490 ||
		GetVehicleModel(GetPlayerVehicleID(playerid)) == 528 ||
		GetVehicleModel(GetPlayerVehicleID(playerid)) == 407 ||
		GetVehicleModel(GetPlayerVehicleID(playerid)) == 544 ||
		GetVehicleModel(GetPlayerVehicleID(playerid)) == 470 ||
		GetVehicleModel(GetPlayerVehicleID(playerid)) == 598 ||
		GetVehicleModel(GetPlayerVehicleID(playerid)) == 596 ||
		GetVehicleModel(GetPlayerVehicleID(playerid)) == 597 ||
		GetVehicleModel(GetPlayerVehicleID(playerid)) == 599 ||
		GetVehicleModel(GetPlayerVehicleID(playerid)) == 597 ||
		GetVehicleModel(GetPlayerVehicleID(playerid)) == 601 ||
		GetVehicleModel(GetPlayerVehicleID(playerid)) == 428 ||
		GetVehicleModel(GetPlayerVehicleID(playerid)) == 499 ||
		GetVehicleModel(GetPlayerVehicleID(playerid)) == 609 ||
		GetVehicleModel(GetPlayerVehicleID(playerid)) == 524 ||
		GetVehicleModel(GetPlayerVehicleID(playerid)) == 578 ||
		GetVehicleModel(GetPlayerVehicleID(playerid)) == 486 ||
		GetVehicleModel(GetPlayerVehicleID(playerid)) == 406 ||
		GetVehicleModel(GetPlayerVehicleID(playerid)) == 573 ||
		GetVehicleModel(GetPlayerVehicleID(playerid)) == 455 ||
		GetVehicleModel(GetPlayerVehicleID(playerid)) == 588 ||
		GetVehicleModel(GetPlayerVehicleID(playerid)) == 403 ||
		GetVehicleModel(GetPlayerVehicleID(playerid)) == 514 ||
		GetVehicleModel(GetPlayerVehicleID(playerid)) == 423 ||
		GetVehicleModel(GetPlayerVehicleID(playerid)) == 414 ||
        GetVehicleModel(GetPlayerVehicleID(playerid)) == 443 ||
        GetVehicleModel(GetPlayerVehicleID(playerid)) == 515 ||
        GetVehicleModel(GetPlayerVehicleID(playerid)) == 456 ||
        GetVehicleModel(GetPlayerVehicleID(playerid)) == 422 ||
        GetVehicleModel(GetPlayerVehicleID(playerid)) == 482 ||
        GetVehicleModel(GetPlayerVehicleID(playerid)) == 530 ||
        GetVehicleModel(GetPlayerVehicleID(playerid)) == 418 ||
        GetVehicleModel(GetPlayerVehicleID(playerid)) == 572 ||
        GetVehicleModel(GetPlayerVehicleID(playerid)) == 413 ||
        GetVehicleModel(GetPlayerVehicleID(playerid)) == 440 ||
        GetVehicleModel(GetPlayerVehicleID(playerid)) == 543 ||
        GetVehicleModel(GetPlayerVehicleID(playerid)) == 583 ||
        GetVehicleModel(GetPlayerVehicleID(playerid)) == 478 ||
        GetVehicleModel(GetPlayerVehicleID(playerid)) == 554 ||
        GetVehicleModel(GetPlayerVehicleID(playerid)) == 402 ||
        GetVehicleModel(GetPlayerVehicleID(playerid)) == 542 ||
        GetVehicleModel(GetPlayerVehicleID(playerid)) == 603 ||
        GetVehicleModel(GetPlayerVehicleID(playerid)) == 475 ||
        GetVehicleModel(GetPlayerVehicleID(playerid)) == 568 ||
        GetVehicleModel(GetPlayerVehicleID(playerid)) == 504 ||
        GetVehicleModel(GetPlayerVehicleID(playerid)) == 457 ||
        GetVehicleModel(GetPlayerVehicleID(playerid)) == 483 ||
        GetVehicleModel(GetPlayerVehicleID(playerid)) == 508 ||
        GetVehicleModel(GetPlayerVehicleID(playerid)) == 429 ||
        GetVehicleModel(GetPlayerVehicleID(playerid)) == 541 ||
        GetVehicleModel(GetPlayerVehicleID(playerid)) == 415 ||
        GetVehicleModel(GetPlayerVehicleID(playerid)) == 480 ||
        GetVehicleModel(GetPlayerVehicleID(playerid)) == 434 ||
        GetVehicleModel(GetPlayerVehicleID(playerid)) == 506 ||
        GetVehicleModel(GetPlayerVehicleID(playerid)) == 451 ||
        GetVehicleModel(GetPlayerVehicleID(playerid)) == 555 ||
        GetVehicleModel(GetPlayerVehicleID(playerid)) == 477 ||
        GetVehicleModel(GetPlayerVehicleID(playerid)) == 400 ||
        GetVehicleModel(GetPlayerVehicleID(playerid)) == 404 ||
        GetVehicleModel(GetPlayerVehicleID(playerid)) == 489 ||
        GetVehicleModel(GetPlayerVehicleID(playerid)) == 479 ||
        GetVehicleModel(GetPlayerVehicleID(playerid)) == 442 ||
        GetVehicleModel(GetPlayerVehicleID(playerid)) == 458 ||
		GetVehicleModel(GetPlayerVehicleID(playerid)) == 558)
       {
		    ShowMenuForPlayer(TuningMenu, playerid);
		    TogglePlayerControllable(playerid,0);
}
else
{
       SendClientMessage(playerid,COLOR_YELLOW,"[AVISO] Nao e permitido voce modificar este veiculo");
}
}
}
		return 1;
		}
		 return 0;
   }
leosivi, quando eu compilo com o cуdigo que vocк me passou, dб erro por ter "PlayerToPoint" que nгo й reconhecido.
Kon_br eu to colocando no FS mesmo.
Reply
#8

alguйm?

ps: esse comando ta dentro do FS, nгo do GM.
Reply
#9

Arrumei
Tente isso
NO INICIO DO GM JUNTO COM AS FORWARD
Код:
forward PlayerToPoint(Float:radi, playerid, Float:x, Float:y, Float:z);
pawn Код:
if(strcmp(cmdtext, "/tunar", true) == 0)
{
    if (PlayerToPoint(15.0, playerid, X,Y,Z))//Coloque as Cordenadas em X,Y,Z
    {
        SendClientMessage(playerid,0xFFFFFFFF,"Vocк nгo estб em um local de tuning!");
    }
    return 1;
Reply
#10

Quote:
Originally Posted by leosivi
Посмотреть сообщение
Arrumei
Tente isso
NO INICIO DO GM JUNTO COM AS FORWARD
Код:
forward PlayerToPoint(Float:radi, playerid, Float:x, Float:y, Float:z);
pawn Код:
if(strcmp(cmdtext, "/tunar", true) == 0)
{
    if (PlayerToPoint(15.0, playerid, X,Y,Z))//Coloque as Cordenadas em X,Y,Z
    {
        SendClientMessage(playerid,0xFFFFFFFF,"Vocк nгo estб em um local de tuning!");
    }
    return 1;
Amigo, eu estou editando o comando /tunar direto pelo FS, no FS nгo tem "PlayerToPoint", quando eu tento seu cуdigo da esse erro:
function "PlayerToPoint" is not implemented
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)