Script Request Thread #5

Quote:
Originally Posted by Michael@Belgium
Посмотреть сообщение
Thanks !
But 1 another cmd: plz convert it again to ZCMD xD if i do it ... it don't work >_<
pawn Код:
//CODE
Thanks
pawn Код:
CMD:heal(playerid, params[])
{
    if(gTeam[playerid] == MEDIC)
    {
        if((params[0] == 0) || ((params[0] == 1) && (params[1] == 0)))
            return SendClientMessage(playerid, COLOR_LIGHTBLUE, "USAGE: /heal [id]");
        new
            Float: X,
            Float: Y,
            Float: Z,
            id = strval(tmp);
        if(!GetPlayerPos(id, X, Y, Z))
            return SendClientMessage(playerid, COLOR_GREY, "AdmCmd: This player is not online!");
        if(IsPlayerInRangeOfPoint(playerid, 3.0, X, Y, Z))
        {
            new
                string[128];
            GetPlayerName(playeridid, string, MAX_PLAYER_NAME);
            format(string, sizeof string, "[INFO] Medic %s[%d] has healed you!", string, playerid);
            SendClientMessage(id,COLOR_GREY,string);
            SetPlayerHealth(id, 100.0);
        } else {
            SendClientMessage(playerid,COLOR_RED,"You're not near the player!");
        }
    } else {
        SendClientMessage(playerid,COLOR_RED,"You're not a Medic!");
    }
    return 1;
}
Quote:
Originally Posted by deshane
Посмотреть сообщение
hey...
can someone have a skill weapons script??
if we kill someone we get weapons skill.....
and we can check our weapons skill

sorry for my bad english
pawn Код:
new
    PlayerSkillLevel[MAX_PLAYER][11];
#define GetPlayerSkillLevel(%0,%1) PlayerSkillLevel[(%0)][(%1)]
native SetPlayerSkillLevelEx(playerid, skill, level) = SetPlayerSkillLevel;
#define SetPlayerSkillLevel(%0,%1,%2) SetPlayerSkillLevelEx((%0), (%1), (PlayerSkillLevel[(%0)][(%1)] = (%2)))
pawn Код:
//OnPlayerDeath
    switch(reason)
    {
        case 22..31: SetPlayerSkillLevel(playerid, reason - 22, GetPlayerSkillLevel(playerid, reason - 22) + 1);
        case 32: SetPlayerSkillLevel(playerid, 6, GetPlayerSkillLevel(playerid, 6) + 1);
        case 34: SetPlayerSkillLevel(playerid, 10, GetPlayerSkillLevel(playerid, 10) + 1);
    }
Quote:
Originally Posted by Mititel
Посмотреть сообщение
Well I need a script with the derby is an arena in which some machines are up and then moves down and hit.
I would interpret this as a valley where vehicles are on both sides rolling down and hit

Really I have no clue what you are trying to explain

Get someone who can translate your english in something understandable (no offend)
Reply

Hi, I'm new to scripting and I need some help making factions and making them work with my Gamemode script, if you have anything to offer or a tutorial or ANYTHING add me on MSN or Gtalk.

MSN: xbox-360-pro@live.ca
GTalk: m99farag@gmail.com
Reply

Requesting;

2 Functions

Info;
Код:
stock AddNeonLightToVehicle(vehcleid, neonlight, neonid, Float:X, Float:Y, Float:Z) //neonlight = objectid if the neonlights
stock RemoveNeonLight(vehicleid, neonid)
Reply

Good evening,

I have a problem, I got on the www.sa-mp.com an filterscript with personal car + 3dtextlabel.

I installed it and entered the serer but I noticed that 3dtextlabel attached to all cars, how can I attach only to personal cars (in my gm are numbered from 1 to 51)

Please help me !

Filterscript here: http://forum.sa-mp.com/showthread.ph...ght=3dtext+car

PS: Sorry for my bad english i'm romanian !
Reply

I have a problem.
How can i enter and exit house with ENTER key? I use Raven's Roleplay gamemode and it's a anoying to always type in /enter and /exit. If you want i can also send a pawn code.
Reply

nvm....................
Reply

OMG ! Can anyone make me a /admins cmd >_< IT'S JUST NEVER WORK

Here an example:
pawn Код:
dcmd_admins(playerid, params[])
{
    #pragma unused params
    new string[128], pName[MAX_PLAYER_NAME],count = 0;
    SendClientMessage(playerid,COLOR_BROWN,"|__Online Admin/Mods/Vips__|");
    GetPlayerName(playerid, pName, 32);
    for(new i=0;i<= MAX_SERVER_PLAYERS;i++)
    {
        if(IsPlayerConnected(i))
        {
            if(PlayerInfo[playerid][level] != 0)
            {
                if(PlayerInfo[playerid][level] == 1) format(string, 60, "Name: %s | Level: %d [VIP]",pName,PlayerInfo[playerid][level]);
                else if(PlayerInfo[playerid][level] == 2) format(string, 60, "Name: %s | Level: %d [MOD]",pName,PlayerInfo[playerid][level]);
                else if(PlayerInfo[playerid][level] == 3) format(string, 60, "Name: %s | Level: %d [ADMIN]",pName,PlayerInfo[playerid][level]);
                else if(IsPlayerAdmin(playerid)) format(string, 60, "Name: %s | Level: %d [SERVER ADMIN/OWNER]",pName,PlayerInfo[playerid][level]);
                SendClientMessage(playerid,COLOR_ORANGE,string);
                count++;
                SendClientMessage(playerid,COLOR_BROWN,"------------------------");
                format(string, sizeof string,"Total Online: %i",count);
            }
        }
    }
    return 1;
}
Thanks for fix
Reply

pawn Код:
dcmd_admins(playerid, params[])
{
    #pragma unused params
    new string[128], pName[MAX_PLAYER_NAME],count = 0;
    SendClientMessage(playerid,COLOR_BROWN,"|__Online Admin/Mods/Vips__|");
    GetPlayerName(playerid, pName, 32);
    for(new i=0;i<= MAX_SERVER_PLAYERS;i++)
    {
        if(IsPlayerConnected(i))
        {
            if(PlayerInfo[i][level] != 0)
            {
                if(PlayerInfo[i][level] == 1) format(string, 60, "Name: %s | Level: %d [VIP]",pName,PlayerInfo[playerid][level]);
                if(PlayerInfo[i][level] == 2) format(string, 60, "Name: %s | Level: %d [MOD]",pName,PlayerInfo[playerid][level]);
                if(PlayerInfo[i][level] == 3) format(string, 60, "Name: %s | Level: %d [ADMIN]",pName,PlayerInfo[playerid][level]);
                if(IsPlayerAdmin(i)) format(string, 60, "Name: %s | Level: %d [SERVER ADMIN/OWNER]",pName,PlayerInfo[playerid][level]);
                SendClientMessage(playerid,COLOR_ORANGE,string);
                count++;
                SendClientMessage(playerid,COLOR_BROWN,"------------------------");
                format(string, sizeof string,"Total Online: %i",count);
            }
        }
    }
    return 1;
}
not tested
Reply

That will send the total online number every time it loops through an admin Also, it will not show the admins name because all you did was get the name of the player who called the command at the top. Try this. Could use some more improvement as far as optimization goes but should work plenty fine.

pawn Код:
dcmd_admins(playerid, params[])
{
    #pragma unused params

    new
        string[128],count,
        pName[MAX_PLAYER_NAME];

    SendClientMessage(playerid,COLOR_BROWN,"|__Online Admin/Mods/Vips__|");
    for(new i=0;i<= MAX_SERVER_PLAYERS;i++)
    {
        if(PlayerInfo[i][level])
            GetPlayerName(i,pName,24);
        else
            continue;

        count++;
        switch(PlayerInfo[i][level])
        {
            case 1:format(string, 60, "Name: %s | Level: 1 [VIP]",pName);
            case 2:format(string, 60, "Name: %s | Level: 2 [MOD]",pName);
            case 3:format(string, 60, "Name: %s | Level: 3 [ADMIN]",pName);
        }
        if(IsPlayerAdmin(i))
            format(string, 60, "Name: %s | Level: %d [SERVER ADMIN/OWNER]",pName,PlayerInfo[playerid][level]);

        SendClientMessage(playerid,COLOR_ORANGE,string);
    }
    SendClientMessage(playerid,COLOR_BROWN,"------------------------");
    if(count)
        format(string, 128,"Total Online: %d",count);
    else
        return SendClientMessage(playerid,COLOR_BROWN,"There are currently no admins online."),1;

    SendClientMessage(playerid,COLOR_BROWN,string);
    return 1;
}
Another way you could do it is just to have the switch statement and then continue the loop's iteration if the case is 0.
Reply

Quote:
Originally Posted by tanush
Посмотреть сообщение
pawn Код:
dcmd_admins(playerid, params[])
{
    #pragma unused params
    new string[128], pName[MAX_PLAYER_NAME],count = 0;
    SendClientMessage(playerid,COLOR_BROWN,"|__Online Admin/Mods/Vips__|");
    GetPlayerName(playerid, pName, 32);
    for(new i=0;i<= MAX_SERVER_PLAYERS;i++)
    {
        if(IsPlayerConnected(i))
        {
            if(PlayerInfo[i][level] != 0)
            {
                if(PlayerInfo[i][level] == 1) format(string, 60, "Name: %s | Level: %d [VIP]",pName,PlayerInfo[playerid][level]);
                if(PlayerInfo[i][level] == 2) format(string, 60, "Name: %s | Level: %d [MOD]",pName,PlayerInfo[playerid][level]);
                if(PlayerInfo[i][level] == 3) format(string, 60, "Name: %s | Level: %d [ADMIN]",pName,PlayerInfo[playerid][level]);
                if(IsPlayerAdmin(i)) format(string, 60, "Name: %s | Level: %d [SERVER ADMIN/OWNER]",pName,PlayerInfo[playerid][level]);
                SendClientMessage(playerid,COLOR_ORANGE,string);
                count++;
                SendClientMessage(playerid,COLOR_BROWN,"------------------------");
                format(string, sizeof string,"Total Online: %i",count);
            }
        }
    }
    return 1;
}
not tested
It's the same xD


Quote:
Originally Posted by Backwardsman97
Посмотреть сообщение
That will send the total online number every time it loops through an admin Also, it will not show the admins name because all you did was get the name of the player who called the command at the top. Try this. Could use some more improvement as far as optimization goes but should work plenty fine.

pawn Код:
dcmd_admins(playerid, params[])
{
    #pragma unused params

    new
        string[128],count,
        pName[MAX_PLAYER_NAME];

    SendClientMessage(playerid,COLOR_BROWN,"|__Online Admin/Mods/Vips__|");
    for(new i=0;i<= MAX_SERVER_PLAYERS;i++)
    {
        if(PlayerInfo[i][level])
            GetPlayerName(i,pName,24);
        else
            continue;

        count++;
        switch(PlayerInfo[i][level])
        {
            case 1:format(string, 60, "Name: %s | Level: 1 [VIP]",pName);
            case 2:format(string, 60, "Name: %s | Level: 2 [MOD]",pName);
            case 3:format(string, 60, "Name: %s | Level: 3 [ADMIN]",pName);
        }
        if(IsPlayerAdmin(i))
            format(string, 60, "Name: %s | Level: %d [SERVER ADMIN/OWNER]",pName,PlayerInfo[playerid][level]);

        SendClientMessage(playerid,COLOR_ORANGE,string);
    }
    SendClientMessage(playerid,COLOR_BROWN,"------------------------");
    if(count)
        format(string, 128,"Total Online: %d",count);
    else
        return SendClientMessage(playerid,COLOR_BROWN,"There are currently no admins online."),1;

    SendClientMessage(playerid,COLOR_BROWN,string);
    return 1;
}
Another way you could do it is just to have the switch statement and then continue the loop's iteration if the case is 0.
Whoh ! This is alot different of my script xD but tysm ! Im gonna test it ... i hope it works
Reply

Someone can do 0.3c, script without mysql, same IP can't register in server ( Roleplay ).
Thanks guys.
Reply

Hi im new to scripting so alot of things is still very confusing to what they actually do and how i should be writing them.

Basically i need help with making six factions (UC, SRT, HellHounds, Civilians, Zombies and Tyrants) for a friends Zombie server. Id much appreciate it if someone could help me make them cause im really struggling with them. I got everything regarding positions and have codes for mapped objects and vehicles.. its just scripting it all so that each team has its certain spawn point, commands and so forth to me is very hard.

EDIT: By the way.. I was wondering how do you make it so you have to be invited into the faction or set by an admin? Do you require a database for this?
Reply

Hello,

I need a scripter with some extra time.
If you have scripting knowledge and some free time to start a server, I need your help.
I wont ask for leet stuff, i'll keep it simple dont worry

Post here or send me a PM.

Thanks.
Reply

Quote:
Originally Posted by 0verdoses
View Post
Hello,

I need a scripter with some extra time.
If you have scripting knowledge and some free time to start a server, I need your help.
I wont ask for leet stuff, i'll keep it simple dont worry

Post here or send me a PM.

Thanks.
This is not the place to request scripters
Towork foryou, but to request scripts
Reply

Nero, wouldn't it be better with MySql since my server is MySql?
Reply

I'm not into samp-scripting yet, but I just wonder if it would be possible to detect extern files (like m0d_******.ini) and autokick that player if system found that file.
That would eliminate ****** atm
Reply

im using COD GM I need Textdraw Countdown 30 seconds for playyer enter aear i will pust that in areaenter can anybody me the countdown please
Im Try But That not work Good
Reply

Quote:
Originally Posted by dr.pepper
Посмотреть сообщение
Nero, wouldn't it be better with MySql since my server is MySql?
Where do you want to MySql there ?
It only saves the ip in a variable and than it gets deleted some seconds later in OnPlayerDisconnect

Quote:
Originally Posted by JFKgamer
Посмотреть сообщение
I'm not into samp-scripting yet, but I just wonder if it would be possible to detect extern files (like m0d_******.ini) and autokick that player if system found that file.
That would eliminate ****** atm
what do you mean with "extern files"
With the native you could check if a file exist in the scriptfiles folder
But there are some plugins for more file options which arent limited to the scriptfiles folder
Reply

Hey, can someone help me?

I want to know how i can convert HEX-colors to the codes used for color embedding.

Thanks,

Danny
Reply

Quote:
Originally Posted by -Danny-
Посмотреть сообщение
Hey, can someone help me?

I want to know how i can convert HEX-colors to the codes used for color embedding.

Thanks,

Danny
You mean in SendClientMessage as example ?

Just leave the Alpha part away from the RGBA format

Example: Red: 0xFF0000FF => FF0000
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)