Some scripts needs help
#1

So i have some scripts that i need to have done ( if you will help me )
1. Flip Command

It flips the car over works perfectly but i would like to add that it fixs car to 1000hp ( brand new car )
Код:
if(!strcmp(cmdtext, "/flip", true))
	{
		new var10 = 0, Float:var11 = 0.0, Float:var12 = 0.0, Float:var13 = 0.0;
		GetPlayerPos(playerid, var11, var12, var13);
		var10 = GetPlayerVehicleID(playerid);
		SetVehiclePos(var10, var11, var12, var13);
		SetVehicleZAngle(var10, 0.0);
		return 1;
	}
Reply
#2

Код:
SetVehicleHealth(vehicleid, 1000);
Add that to the code
Reply
#3

Actually with his variables:
Код:
SetVehicleHealth(var10,1000.0);
Reply
#4

hmm
Код:
error 017: undefined symbol "vehicleid"
@EDIT
Works now

2.
Savepos
I want that to SAVE the angle ( like which the front car is i hope you know what i mean ) and it is for the player it use so the other player when will type /loadpos wont get the same position and other player saved
Код:
if(strcmp(cmd, "/savepos", true) == 0) {
  GetPlayerPos(playerid,LocX, LocY, LocZ);
  GetPlayerFacingAngle(playerid,Ang);
  SendClientMessage(playerid,COLOR_GREEN,"Twoja pozycja do teleportacji została zapisana");
  return 1;
  }
Reply
#5

new Float:angle;

Код:
GetPlayerFacingAngle(angle);


SetPlayerFacingAngle(playerid, angle);
and the brand new vehicle you can do it by SetVehicleHealth and RepairVehicle
Reply
#6

Quote:
Originally Posted by _Saif_
new Float:angle;

Код:
GetPlayerFacingAngle(angle);


SetPlayerFacingAngle(playerid, angle);
and the brand new vehicle you can do it by SetVehicleHealth and RepairVehicle
Why both?
RepairVehicle is enough, It fixes everything.
Reply
#7

ignore that script for while need this

3. Vehgod
It is like the script that repair the car fully when the car health is below 1000 ( max ) and it fixs body parts ( bumpers etc. ) There is my /fix command that fixes whole car + car parts
Код:
if(strcmp(cmdtext, "/fix", true) == 0)
{
	if(IsPlayerInAnyVehicle(playerid))
	{
	    new vehicleid = GetPlayerVehicleID(playerid);
	    RepairVehicle(vehicleid);
	}
	return 1;
}
Reply
#8

Quote:

Why both?
RepairVehicle is enough, It fixes everything.

SetVehicleHealth only fixes the vehicle health it doesnt fixes its components and according to him he said he needs brand new , so that s why i suggest to use RepairVehicle as well.

Read his post again!
Reply
#9

Quote:
Originally Posted by _Saif_
Quote:

Why both?
RepairVehicle is enough, It fixes everything.

SetVehicleHealth only fixes the vehicle health it doesnt fixes its components and according to him he said he needs brand new , so that s why i suggest to use RepairVehicle as well.

Read his post again!
I read the post several times. You suggest him to use both SetVehicleHealth and RepairVehicle, when RepairVehicle is doing all Of It together in one function.
If It Isn't what you meant, that Is what you wrote.
So If he does like you said, It would set the vehicles health twice, wich wouldn't be neccessary.
Reply
#10

i use this for setting vehicle health:

Код:
       if(health < 849){
         SetVehicleHealth(repveh, health+150);
       }
       else{
         RepairVehicle(repveh);
       }
I only use it for part repairs as i use it on a timer for a specific job, it means the vehicle is still destructible.

just chipping in
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)