2 questions any help please :)
#1

Hello best homies i want to ask 2 questions:
1: How to make system when player loose low of 50 % health i want camera start mooving like he is drunk and when player loose lo of 20% Health i want to get some of crack animations and i want som ambulance command to use when go to player and type /healthplayer the Vet start animation like he is plant a bomb and player who lose health to get another 100% health maybe is not hard but i dont know how to make it i'm newbie in scripting soo please understand me

2: How to set player password - i mean when player select menu someone player want to play with my skyn (admin skin) i want to pop up a window and type password to get skin and play if is possible of course

Thanks in advance i'm sorry if you lose your time for me but like a said im newbie in scripting and i learn now Happy day
Reply
#2

Please HELP ME :/
Reply
#3

PHP код:
#include <a_samp>
//news dos textdraws
new Text:Textdraw0;
new 
hourtwohahaminutetwohaha;
new 
Text:HealthBar[MAX_PLAYERS];
new 
Text:ArmourBar[MAX_PLAYERS];
new 
Text:TextDrawDetorn;
#if defined FILTERSCRIPT
public OnFilterScriptInit()
{
    print(
"\n--------------------------------------");
    print(
" Blank Filterscript by your name here");
    print(
"--------------------------------------\n");
    return 
1;
}
public 
OnFilterScriptExit()
{
    return 
1;
}
#else
main()
{
    print(
"\n----------------------------------");
    print(
" Blank Gamemode by your name here");
    print(
"----------------------------------\n");
}
#endif
public OnGameModeInit()
{
AddPlayerClass(280,1594.3829,-1675.4155,5.8906,265.8557,23,9999999,25,9999999,31,9999999); //policia militar
SetTimer("AtualizarBars",1000,true);
return 
1;
}
public 
OnPlayerConnect(playerid)
{
        
HealthBar[playerid] = TextDrawCreate(548.00000066.000000"100");
        
TextDrawBackgroundColor(HealthBar[playerid], 255);
        
TextDrawFont(HealthBar[playerid], 1);
        
TextDrawLetterSize(HealthBar[playerid], 0.2800001.000000);
        
TextDrawColor(HealthBar[playerid], -1);
        
TextDrawSetOutline(HealthBar[playerid], 1);
        
TextDrawSetProportional(HealthBar[playerid], 1);
        
ArmourBar[playerid] = TextDrawCreate(548.00000043.000000"100");
        
TextDrawBackgroundColor(ArmourBar[playerid], 255);
        
TextDrawFont(ArmourBar[playerid], 1);
        
TextDrawLetterSize(ArmourBar[playerid], 0.2900001.100000);
        
TextDrawColor(ArmourBar[playerid], -1);
        
TextDrawSetOutline(ArmourBar[playerid], 1);
        
TextDrawSetProportional(ArmourBar[playerid], 1);
        
Textdraw0 TextDrawCreate(532.000000405.000000"ELEMENT OFICIAL");
        
TextDrawBackgroundColor(Textdraw0255);
        
TextDrawFont(Textdraw01);
        
TextDrawLetterSize(Textdraw00.3599982.099998);
        
TextDrawColor(Textdraw0, -7601921);
        
TextDrawSetOutline(Textdraw01);
        
TextDrawSetProportional(Textdraw01);
        return 
1;
}
public 
OnPlayerSpawn(playerid)
{
TextDrawShowForPlayer(playeridTextDrawDetorn);
return 
1;
}
forward AtualizarBars();
public 
AtualizarBars()
{
        for(new 
playeridplayerid<GetMaxPlayers(); playerid++)
        {
        if(
IsPlayerConnected(playerid))
        {
        new 
Float:Health;
        new 
HealthString[15];
        
GetPlayerHealth(playerid,Health);
        
format(HealthString15"       %d",floatround(Health));
        
TextDrawSetString(HealthBar[playerid],HealthString);
        
TextDrawShowForPlayer(playerid,HealthBar[playerid]);
        new 
Float:Armour;
        
GetPlayerArmour(playerid,Armour);
        if(
Armour 0)
        {
        new 
ArmourString[15];
        
format(ArmourString15"       %d",floatround(Armour));
        
TextDrawSetString(ArmourBar[playerid],ArmourString);
        
TextDrawShowForPlayer(playerid,ArmourBar[playerid]);
        }
return 
1;

This meets his first requests
Please reputation
Reply
#4

When i read this i dont think is that what i search
Reply
#5

Go to the tutorials section or search.
This is for help, not learning everything, it's clearly documented on the wiki and tutorials how to do these certain things, just take it 1 step at a time.

Like make the player drunk:
https://www.******.dk/search?q=samp%20drunk
Reply
#6

It's easy for you... but for me is very hard...
Reply
#7

Where do you not come on? Post your codes here, so we look about that.

Mencent
Reply
#8

With the first one, start off by setting a repeating timer under OnGameModeInit, using:
https://sampwiki.blast.hk/wiki/SetTimer
Код:
SetTimer("1SecTimer", 1000, true);
/*
1SecTimer - The public we're gonna call
1000 - The time it will take before we call the public in milliseconds, we'll set it to 1 second
true - Should it repeat, in this case we want to check his health each second, so true, it should repeat
*/
Then in the public, loop through all players
https://sampwiki.blast.hk/wiki/Keywords:Statements#for
Код:
for(new i = 0; i < MAX_PLAYERS; i ++) // Calls the code underneath 500 times as "i"
{
    if(IsPlayerConnected(i)) // Check if that number is connected
    {

    }
}
Or just use foreach

And check if their health is below etc. 50
https://sampwiki.blast.hk/wiki/GetPlayerHealth
Код:
new
    Float: HP // Declare "HP" as a float (a number that can hold decimals, like 21.1582)
;
GetPlayerHealth(i, HP); // Stores the players health in the HP float
if(HP < 50) // If the HP float is set to something lower than 50
{

}
And then set their drunk level.
https://sampwiki.blast.hk/wiki/SetPlayerDrunkLevel
Код:
if(HP < 50)
{
    SetPlayerDrunkLevel(i, 2000);
}
Reply
#9

can you get the code everything in one to i see exacutly how look this because is little maze for me
Reply
#10

OK Lets start it
Here is my 3 medics ped
PHP код:
AddPlayerClass(274,1176.4547,-1323.8755,14.0221,269.8242,0,0,0,0,0,0); // Driver Medic
AddPlayerClass(70,1176.9865,-1323.8557,14.0484,269.9431,0,0,0,0,0,0); // Doctor
AddPlayerClass(276,1177.7422,-1323.2667,14.0857,270.5919,0,0,0,0,0,0); // Driver2 
Okay we need only DOCTOR make command /healthplayer but we need to create they a team to only DOCTOR make use this command and here is the name of ANIM who i want to do Doctor when health player
PHP код:
BOM_Plant_Crouch_In 
So and this is the anim who i want when player lose more than 50 % of his HP
PHP код:
Sweet_injuredloop PLUS Drunk Camera 
And here is the anim who i want to player make when he lose than 80% of his health
PHP код:
crckdeth3 
Soo that's all now i need someone who know how to make the command and team
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)