Script Request Thread #5

Hi.. Could someone give me a helping hand and try to script a working automatic "crack" system, when player's health is 20 or lower. It should use animation "KO_spin_L " (from "PED" cate).
So what i need, is a timer which checks every, lets say 3 seconds, if someone's health is under 20 (easy timer). When their HP us under 20, they will be send in "KO_spin_L " animation, also frozen in it (ONLY ONCE, which gives me problems <.<). Only way to get out of this is next what i need:


I also need 2 commands, to get off from the "auto-crack". They should be like this:

- /getup, you could use /getup only after there has passed 2,5 minutes from when you fell in the "auto-crack" (I got problems with this... The timer of it fucked up after first /getup o.o)
- /helpup [ID], you could help someone up from "auto-crack" any time when you're near them. There should be animation "BOM_Plant" (from "BOMB" cate). Also, this animation should be ran for 7 seconds. (Or around 7 seconds) (Not so needed but would love it. Can add it later myself too if I want to :P)

If anyone can make this quick, just throw it to me via a PM. I'd be nice and slam you some rep+ of course.


I think someone already gave this to me, but it didn't work so well... It doesn't work for other players, and after the first /getup it's timer won't repeat after going next time in auto-crack (except after die'ing it works again, due to OnPlayerSpawn it'll repeat...)
pawn Код:
#include a_samp

    enum crack2
    {
            bool: is_cracked,
            timer,
            c_down,
            bool:c_isover,
            Float:health
    };

    new crack[MAX_PLAYERS][crack2];

    forward Crack_Timer(playerid);
    forward Count_Down(playerid);

    public OnPlayerSpawn(playerid)
    {
            crack[playerid][is_cracked] = false;
            crack[playerid][c_isover] = false;
            crack[playerid][timer] = SetTimerEx("Crack_Timer",1500,true,"i",playerid);
            crack[playerid][c_down] = SetTimerEx("Count_Down", 5 * 60 * 250, false, "i", playerid);
            return 1;
    }

    public Crack_Timer(playerid)
    {
            GetPlayerHealth(playerid,crack[playerid][health]);
            if( (crack[playerid][health] <= 20) && (crack[playerid][is_cracked] == false) )
            {
                    if(crack[playerid][is_cracked] == false) crack[playerid][is_cracked] = true;
                    TogglePlayerControllable(playerid,false);
                    ApplyAnimation(playerid,"PED","KO_spin_L",2.8,0,1,1,1,0);
            }
            return 1;
    }

    public Count_Down(playerid)
    {
            if(crack[playerid][is_cracked] == true)
            {
                crack[playerid][c_isover] = true;
                KillTimer(crack[playerid][timer]);
            }
            return 1;
    }

    PlayerToPlayer(playerid,toplayerid)
    {
            new Float:pos[2][3];
            GetPlayerPos(playerid,pos[0][0],pos[0][1],pos[0][2]);
            GetPlayerPos(toplayerid,pos[1][0],pos[1][1],pos[1][2]);
            pos[0][0] -= pos[1][0];
            pos[0][1] -= pos[1][1];
            pos[0][2] -= pos[1][2];
            return floatround( floatsqroot( (floatpower(pos[0][0],2) + floatpower(pos[0][1],2) + floatpower(pos[0][2],2) ) ), floatround_round);
    }
   
    public OnPlayerCommandText(playerid, cmdtext[])
    {
            if(!strcmp(cmdtext,"/getup",true))
            {
                if( (crack[playerid][is_cracked] == true) && (crack[playerid][c_isover] == true))
                {
                    SendClientMessage(playerid, -1, "You got up!");
                    crack[playerid][is_cracked] = false;
                    SetPlayerSpecialAction(playerid, SPECIAL_ACTION_NONE);
                    TogglePlayerControllable(playerid,true);
                    SetPlayerHealth(playerid, 25);
                    SetTimerEx("Crack_Timer",2000,true,"i",playerid);
                    }
                return 1;
            }
            if(!strcmp(cmdtext,"/helpup",true,9))
            {
                if(!cmdtext[8]) SendClientMessage(playerid,-1,"USAGE: /helpup [ID]");
                else if (PlayerToPlayer(playerid,cmdtext[9]) >= 5) SendClientMessage(playerid,-1,"Player too far!");
                    else if( (crack[cmdtext[9]][is_cracked] == true) && (cmdtext[9] != playerid))
                    {
                        ApplyAnimation(playerid,"BOMBER","BOM_Plant",2.6,1,1,1,0,6800);
                        crack[cmdtext[9]][is_cracked] = false;
                        crack[cmdtext[9]][c_isover] = false;
                        KillTimer(crack[cmdtext[9]][timer]);
                        KillTimer(crack[cmdtext[9]][c_down]);
                        SetPlayerSpecialAction(cmdtext[9],SPECIAL_ACTION_NONE);
                    }
                return 1;
            }
            return 0;
}
Reply

Can Anyone Create A Capture Zone For Me In SF I Have Team USA And RUSSIA USA COLOR BLUE RUSSIA COLOR RED

Please Anyone Help I Really Need It For My Server
Reply

Hey,
im totally noob in scripting and need ur help guys. So i want two things to add on my prv serw:
1- if i shoot to someone inside a car and it blows, that wont give me a score just it counts like suicide, so how to make that i will be killer and get score/cash
2- how to set damage when i hit by car, atm its very low and unrealistic i want something like almost insta death when hit by car.
btw i have noticed when someone is in the car i can shoot him only standing in front of car or behind is it possible to set it also standing on its left/right?
thanks for any help!
Reply

I want 5 admin levels and names in admin chat with command /admins it will show like Level 1-Moderator can anyone

just show me a script example so i can create Level-1,2,3,4,5,6,7 Just create 1 level for me and show in admin list

like /admins then we will see admins like this with name give me 1 so i can script the rest
Reply

Hello, I'm a newbie scripter and I am currently working on a zombie script.
Everything is going fine excpet one part a "/bite" commands, althought I have seen on some servers, zombies bite while the player presses the "alt" button, would be cool if someone could give me a couple of hints how it works and/or script it for me.
So what I basically need is:
A bite script which works for one class only (zombies)
When someone gets bitten a message should appear for all players that are close (like 10-15 IG meters)
"Radom_Zombie1 grabbed Random_Civilian1 and bit him".
The bite does 15 points health damage to the target, ignoring armor and restores 15 points of health to the zombie.
After that the target gets infected and loses 5 health points every 15 seconds, and if the target dies while infected he becomes a zombie, pretty simple huh? Oh and the bite cooldown should be 10 seconds

(Don't forget to explain how it works, I'd like to know more about scripting so I can finish the server one day)

EDIT: The bite radius should be really small.
Reply

Hey guys, ehhmm I've been looking for how to make a server tutorial like when a new player registers it'll set their camera pos and it shows the rules, all that stuff.
Reply

Can u just take tutorial from some rp script and edit it .
Reply

I just want a simple gm....Everyone spawms at a place(in an interior) and new game beggines( team blue in one spot of the interior and team red in the othere spot.)..It is a Team death match..You get 10 points for every kill and 200...you loose 1 each death.After 10 minites the script respawms all players to an other int.. to play tdm agein..Admins can forc that interior change with a cmd..Also if you can i want basic cmds for admins as like /spec /testheathhacks /kick /ban /unban thank YOU
Reply

I just want a simple gm....Everyone spawms at a place(in an interior) and new game beggines( team blue in one spot of the interior and team red in the othere spot.)..It is a Team death match..You get 10 points for every kill and 200...you loose 1 each death.After 10 minites the script respawms all players to an other int.. to play tdm agein..Admins can forc that interior change with a cmd..Also if you can i want basic cmds for admins as like /spec /testheathhacks /kick /ban /unban thank YOU
Reply

I want Stevo's127 San Fierro cops and robbers gm with a skill selection dialog
Textdraws instead of dialogs on robberies
Money bag hunt
Houses
a couple of bus driver bots and thats all please make this i wanted for very long time

I dont want any Filterscripts to make it i want it all in the gamemode
Reply

How should I add this
if(IsPlayerInRangeOfPoint(playerid, -1963.9784,639.1397,46.5625))

In that

if(!strcmp(cmdtext, "/Zlift", true))
{
SetPlayerPos(playerid, -1952.1819,632.2796,145.3092);
return 1;
}

What it is supposed to do is, if the player is near the coordinates -1963.9784,639.1397,46.5625 and types /zlift, he should get teleported to the koordinates -1952.1819,632.2796,145.3092
Reply

Quote:
Originally Posted by [HLF]Southclaw
Посмотреть сообщение
pawn Код:
if(!strcmp(cmdtext, "/Zlift", true))
    {

        if(IsPlayerInRangeOfPoint(playerid, -1963.9784,639.1397,46.5625))
        {
            SetPlayerPos(playerid, -1952.1819,632.2796,145.3092);
            MoarFunctions(...);
        }

        return 1;
    }

I hope that helped
Seems too easy for me, I get the error "warning 202: number of arguments does not match definition"
Thanks for help tho
Reply

Quote:
Originally Posted by [HLF]Southclaw
Посмотреть сообщение
On the line that error appears, look at the function you call, count how many parameters there are then look up the function on SA:MP Wiki and see if you've missed anything!

However, if it's a function from your gamemode (Not a native function) you need to find wherever it's declared and count the parameters there
Thanks a lot
forgot to add the number of the range
if(IsPlayerInRangeOfPoint(playerid, range, x, y, z))
I have just put the x y z coordinates ^^
Thanks again
Reply

delete
Reply

Can someone make me a command(zcmd) like /changeclass and the player who type the command will return to class selection?
Reply

Is There Anyone In Whole SA-MP Who Can Make Capture Zones? I Want A Checkpoint And When Players Get in

it whatever team owns the zone it will be that colour and when another team will capture they need to stay in

checkpoint for 20 seconds i have TEAM_USA color blue TEAM_RUSSIA color red can anyone please make one for me

in San Fierro i really need one ill appriciate that guy ever much who can help me in this please is'nt there anyone who

can help me this much i am dieing to know it
Reply

can someone make to me Faction System to put it my server?
Reply

Can you script /rape for me, please? I will be starting to learn PAWN but at the moment i can't script. :3
Functions:
- When raped you get -20 percent of health off.
- When raped you go up in air like if you've been slapped by an admin but little lower.
- Attempt thingy , it's not like i would love everyone to rape 100% success without any attempt/fail.

Thanks and regards!
Reply

A script where you have to search for items in random buildings etc, to gain health/thirst/hunger. With a dialog inventory system that saves with a dialog. Where you find weapons with minimal ammo etc. Also I want the items to be random not oh go here you get water this and that etc. Also I want you to find random money like 2-3$'s in some of these searched areas. Can anyone create something like this?
Reply

Hi guys!

I want a simple script derby!

Like like this: http://www.youtube.com/watch?v=VvTW2...ature=*********


IMPORTANT:
Min -1 is time to join the derby away!
pre-selected points in a minute put the folder in the car with players!
the last five-second count up how many people are in the derby!
After the derby elkezdцtцtt-cuts can not wait for the next one to join!
keep minutes of all three-derby!
water-falls or crashes your car is lost!
-when it lost to a player who writes his name!
-eg. xy, a small player dropping by!
-who is the winner of the last will not fall down!
write the name of the winner for those who are in the derby!
if two-three minutes left and the end of the then everyone wins!
-after the end of the derby in derby display a list of the map to what you can to vote!
folder, which most people voted for the derby will be the next map!

Note: a derby server map change, do not restart!

Thx!


Hungarian language!

Leнrom magyarul is hбtha megszбn engem egy бldott lйlek...

Ьdv srбcok!

Egyszerű derby script szeretnйk!

Hasonlуt mint ez: http://www.youtube.com/watch?v=VvTW2...ature=*********


FONTOS:
-1 perc ideje van csatlakozni a derby-re!
-egy percen előre kijelцlt pontokra helyezi a mappon a jбtйkosokat autуval egyьtt!
-az utolsу 5 mбsodpercben цsszeszбmolja, hogy hбnyan vagyunk a derby-ben!
-miutбn elkezdцtцtt a derby ne lehesen csatlakozni vбrja meg a kцvetkezőt!
-minden derby 3 percig tartson!
-vнzbe esik vagy цsszetцrik az autуja akkor kiesett!
-amikor kiesett нrja ki annak a jбtйkosnak a nevйt!
-pl:. xy nevű jбtйkos kisesett!
-az nyer aki az utolsу marad, nem esik le!
-a nyertes nevйt нrja ki azoknak akik a derby-ben vannak!
-ha ketten maradtak йs letelik a 3 perc akkor senki se nyert!
-miutбn vйge a derby-ben jelenjen meg egy lista a derby map-rуl amire szavazni lehet!
-amelyik mappra a legtцbben szavazta az lesz a kцvetkező derby map!



Megjegyzйs: 1 Szerver derby tйrkйp vбltбskor ne induljon ъjra!
Reply


Forum Jump:


Users browsing this thread: 5 Guest(s)