SA-MP Forums Archive
Script Request Thread #5 - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Script Request Thread #5 (/showthread.php?tid=187229)

Pages: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34


Re: Script Request Thread #5 - jameskmonger - 30.12.2010

/startjob -> IsPlayerInRangeOfPoint -> Set Checkpoint
Enter Checkpoint -> IsPlayerInRangeOfPoint -> Pay


Re: Script Request Thread #5 - cloudysky - 30.12.2010

Quote:
Originally Posted by jameskmonger
Посмотреть сообщение
/startjob -> IsPlayerInRangeOfPoint -> Set Checkpoint
Enter Checkpoint -> IsPlayerInRangeOfPoint -> Pay
Can re-write the in a pawno code please?


Re: Script Request Thread #5 - Darklom - 30.12.2010

Well I stumbled across the mask system I cannot continue, I've tried using filterscript and I'm just not good with setting player objects, I did it for armor, and other ones but can't on this one if someone can help me out

pawn Код:
if(PlayerInfo[playerid][pMask] == 1)
            {
             //Code here
                return 1;
            }
What I'd ask for help is two or more masks that are adjusted good and they move according to the head.. so I can make a dialog and b ased on what they choose they get that mask.


Re: Script Request Thread #5 - jameskmonger - 30.12.2010

Quote:
Originally Posted by cloudysky
Посмотреть сообщение
Can re-write the in a pawno code please?
No, I've given you everything you need.


Re: Script Request Thread #5 - justsomeguy - 30.12.2010

i need an magnet lifts car script is that possible if sow could anyone make this


Re: Script Request Thread #5 - gondes - 31.12.2010

guys iam request list car price in dealership


Re: Script Request Thread #5 - jameskmonger - 31.12.2010

/buyvehicle ->
pawn Код:
ShowPlayerDialog(playerid,1,DIALOG_STYLE_LIST,"Cars","Car 1 - Price\r\nCar 2 - Price\r\nCar 3 - Price","Buy", "Cancel");



Re: Script Request Thread #5 - gondes - 31.12.2010

Quote:
Originally Posted by jameskmonger
Посмотреть сообщение
/buyvehicle ->
pawn Код:
ShowPlayerDialog(playerid,1,DIALOG_STYLE_LIST,"Cars","Car 1 - Price\r\nCar 2 - Price\r\nCar 3 - Price","Buy", "Cancel");
more details for list vehicle price


Re: Script Request Thread #5 - sherlock - 31.12.2010

Hello does anyone have/can make me a simple tax FS so that every hour players get charged 1/5th of the money they currently have for tax?


Re: Script Request Thread #5 - jameskmonger - 31.12.2010

Quote:
Originally Posted by sherlock
Посмотреть сообщение
Hello does anyone have/can make me a simple tax FS so that every hour players get charged 1/5th of the money they currently have for tax?
SetTimer for 1 hour -> new tax; tax = GetPlayerMoney(playerid) / 5; -> GivePlayerMoney(playerid, -tax);


Re: Script Request Thread #5 - gondes - 01.01.2011

guys i request brutally wounded


Re: Script Request Thread #5 - Haydz - 01.01.2011

Quote:
Originally Posted by gondes
Посмотреть сообщение
guys i request brutally wounded
More information please?

And to the tax guy, i used james's code and i havn't tested it so hopefully it will work
pawn Код:
//Under OnGameModeinit
SetTimer("TaxTimer",3600000,true);

//anywhere in the script just not in another callback.
forward TaxTimer();
public TaxTimer()
{
    for(new j;j<MAX_PLAYERS;j++)
    {
        new tax;
        tax = GetPlayerMoney(j) / 5;
        GivePlayerMoney(j, -tax);
    }
    return 1;
}



Re: Script Request Thread #5 - sherlock - 01.01.2011

ok thx that is the whole thing? because i have never scripted FS in my life :P I only script cleo XD


Re: Script Request Thread #5 - Brian_McCarthy - 02.01.2011

help to include lastname when use command ..i only see firstname wen i use /me what the problem WTF??

CMD:me(playerid, params[]){
if(isnull(params)) return SendClientMessage(playerid, yellow, "/me [text]");
new
string[128],
pName[20 char]
;
GetPlayerName(playerid, pName, sizeof(pName));
format(string, sizeof(string), "* %s %s *", pName, params);
return SendClientMessageToAll(0xFFFFFFFF, string);
}


Re: Script Request Thread #5 - [L3th4l] - 02.01.2011

pawn Код:
CMD:me(playerid, params[])
{
    new
        pName[MAX_PLAYER_NAME],
        String[128];
    if(isnull(params)) return SendClientMessage(playerid, yellow, "/me [text]");
   
    GetPlayerName(playerid, pName, sizeof(pName));

    format(String, sizeof(String), "* %s %s *", pName, params);
    return SendClientMessageToAll(0xFFFFFFFF, String);
}



Re: Script Request Thread #5 - Haydz - 02.01.2011

Quote:
Originally Posted by sherlock
Посмотреть сообщение
ok thx that is the whole thing? because i have never scripted FS in my life :P I only script cleo XD
Depends, i made that so you could add it into your GM


Re: Script Request Thread #5 - Brian_McCarthy - 02.01.2011

Quote:
Originally Posted by [L3th4l]
Посмотреть сообщение
pawn Код:
CMD:me(playerid, params[])
{
    new
        pName[MAX_PLAYER_NAME],
        String[128];
    if(isnull(params)) return SendClientMessage(playerid, yellow, "/me [text]");
   
    GetPlayerName(playerid, pName, sizeof(pName));

    format(String, sizeof(String), "* %s %s *", pName, params);
    return SendClientMessageToAll(0xFFFFFFFF, String);
}
ok tnx but how to show without underscore of player name? i tried but not work how??

here code....
pawn Код:
CMD:me(playerid, params[])
{
    new
        pName[MAX_PLAYER_NAME],
        String[128];
    if(isnull(params)) return SendClientMessage(playerid, yellow, "|| ~Usage: /me [TEXT]~ ||");

    new string[128];
    GetPlayerName(playerid, pName, sizeof(pName));
    format(string,sizeof(string),"%s: %s",RemoveUnderScore(playerid),text);
    return SendClientMessageToAll(0xFFFFFFFF, String);
}

//-
stock RemoveUnderScore(playerid){
    new name[MAX_PLAYER_NAME];
    GetPlayerName(playerid,name,sizeof(name));
    for(new i = 0; i < MAX_PLAYER_NAME; i++){
    if(name[i] == '_') name[i] = ' ';}
    return name;}



Re: Script Request Thread #5 - Larsey123IsMe - 02.01.2011

Im Requesting 2 commands...

/heal [PLAYERID]
/ban [PLAYERID] [REASON]

in strcmp.. nor dcmd or others..


Re: Script Request Thread #5 - admantis - 02.01.2011

Quote:
Originally Posted by Larsey123IsMe
Посмотреть сообщение
Im Requesting 2 commands...

/heal [PLAYERID]
/ban [PLAYERID] [REASON]

in strcmp.. nor dcmd or others..
pawn Код:
if(strcmp("/ban", cmd, true) == 0)
    {
        if(PlayerInfo[playerid][pAdminLevel] > 0)
        {
            tmp = strtok(cmdtext,idx);
            if(!strlen(tmp))
            {
                return SendClientMessage(playerid,COLOR_LIGHTRED,"USAGE: /ban [id] [reason]");
            }
            new reason[128];
            reason = strrest(cmdtext, idx);
            if (!strlen(reason)) SendClientMessage(playerid,COLOR_LIGHTRED,"USAGE: /ban [id] [reason]");
            new id = strval(tmp);
            new pid = playerid;
            if(!IsPlayerConnected(id))
            {
                return SendClientMessage(playerid,COLOR_GRAY,"AdmCmd: This player is not online!");
            }
            new globalmsg[100];
            new adminid[MAX_PLAYERS], victimid[MAX_PLAYERS];
            GetPlayerName(pid, adminid, sizeof(victimid));
            GetPlayerName(id, victimid, sizeof(victimid));
            format(globalmsg,sizeof(globalmsg),"AdmWarn: Administrator %s has banned player %s [%s]",adminid,victimid, reason);
            SendClientMessageToAll(COLOR_LIGHTBLUE,globalmsg);
            PlayerInfo[id][pAccountLocked] = 1;
            BanEx(id, reason);
            return 1;
        }
        else
        {
            SendClientMessage(playerid,COLOR_GRAY,"You don't have authorization.");
            return 1;
        }
    }

stock strrest(const string[], index)
{
    new length = strlen(string),offset = index,result[128];
    while ((index < length) && ((index - offset) < (sizeof(result) - 1)) && (string[index] > '\r'))
    {
        result[index - offset] = string[index];
        index++;
    }
    result[index - offset] = EOS;
    return result;
}



AW: Script Request Thread #5 - thiaZ_ - 02.01.2011

* ignore this post