SA-MP Forums Archive
Script Request Thread #4 - 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)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Script Request Thread #4 (/showthread.php?tid=118885)

Pages: 1 2 3 4 5 6 7 8 9 10


Re: Script Request Thread #4 - tofiffe - 27.08.2010

how then? what to type?


Re: Script Request Thread #4 - JoeySaladino - 27.08.2010

Hey!
I would need an command that I can /drag the player, and when I have done /drag the player comes along with me where I walk / run.

- Thanks!


Re: Script Request Thread #4 - DirtyLilFreak - 28.08.2010

can anyone give me the code for autosave. Like when the player exists the server all his stats carmods weapons and things save automatically and the player doesnt have to use /v park to park. It parks automatically. Appreciate if anyone could help.


Re: Script Request Thread #4 - Rossi123 - 29.08.2010

Ey could someone please show me how to make an /enter and /exit command at houses?
iam using strcmp


Re: Script Request Thread #4 - Miguel - 29.08.2010

Nevermind, ignore this post.


Re: Script Request Thread #4 - [Lsrcr]Rafa - 30.08.2010

hello all i want some1 to post all admins levels and to have all admin commands i realy need it.
Thanks you all guys.


Re: Script Request Thread #4 - Yamoo - 30.08.2010

Quote:
Originally Posted by [Lsrcr]Rafa
Посмотреть сообщение
hello all i want some1 to post all admins levels and to have all admin commands i realy need it.
Thanks you all guys.
Do abit of searching on the Filterscript section.. you'll find some cool admin f.s's there.


Re: Script Request Thread #4 - AndriusZ* - 30.08.2010

i need that: (please)
/setweather id
and
/settime id


Re: Script Request Thread #4 - salut693123 - 30.08.2010

can i have ooc ic shout local ooc please


Re: Script Request Thread #4 - Claude - 01.09.2010

Quote:
Originally Posted by salut693123
Посмотреть сообщение
can i have ooc ic shout local ooc please
Try this homie'

pawn Код:
/* use `string_change[]` for things to add like (( or )), MUST use for roleplay servers!

Make string_change `local` if you want to use it for local chat
Make string_change `ooc` if you want to use it for ooc chat
Make string_change `ic` if you want to use it for ic chat*/

stock SendLocalMessage(playerid, color, string[], string_change[])
{
    new Float:x, Float:y, Float:z, name[24], str_con[128];
    GetPlayerName(playerid, name, sizeof name);
    GetPlayerPos(playerid, x, y, z);
    if(string_change == local)
    {
        format(str_con, 128, "%s(%d) says: %s", name, playerid, string);
        for(new i; i < MAX_PLAYERS; i++)
        {
            if(IsPlayerInRangeOfPoint(i, x, y, z))
            {
                SendClientMessage(i, color, string);
                return 1;
            }
        }
    }
   
    else if(string_change == ooc)
    {
        format(str_con, 128, "(( %s: (%d) %s ))", name, playerid, string);
        for(new i; i < MAX_PLAYERS; i++)
        {
            if(IsPlayerInRangeOfPoint(i, x, y, z))
            {
                SendClientMessage(i, color, string);
                return 1;
            }
        }
    }
   
    else if(string_change == ic)
    {
        format(str_con, 128, "%s: (%d) %s", name, playerid, string);
        for(new i; i < MAX_PLAYERS; i++)
        {
            if(IsPlayerInRangeOfPoint(i, x, y, z))
            {
                SendClientMessage(i, color, string);
                return 1;
            }
        }
    }
    return 0;
}



Re: Script Request Thread #4 - Str4ndb3rg - 09.09.2010

Can someone make a /help command for me so i just can write in what text to come?


Re: Script Request Thread #4 - LarzI - 09.09.2010

Quote:
Originally Posted by Str4ndb3rg
Посмотреть сообщение
Can someone make a /help command for me so i just can write in what text to come?
pawn Код:
if( !strcmp( cmdtext, "/help", true ))
{
    SendClientMessage( playerid, 0xFFFF00FF, "Your text in yellow" );
    //add more
    return true;
}



Re: Script Request Thread #4 - ihatetn931 - 09.09.2010

Quote:
Originally Posted by Str4ndb3rg
Посмотреть сообщение
Can someone make a /help command for me so i just can write in what text to come?
pawn Код:
if(strcmp(cmd, "/help", true) == 0) {
SendClientMessage(playerid, YOUR_COLOR, "Type What you want the command to show here");
SendClientMessage(playerid, YOUR_COLOR, "Type What you want the command to show here");
SendClientMessage(playerid, YOUR_COLOR, "Type What you want the command to show here");
SendClientMessage(playerid, YOUR_COLOR, "Type What you want the command to show here");
        return 1;
    }
to Define a color, You get Hex color codes, Which you can ****** Then you do this ((put this at the top of your script by your other defines if you have any))
pawn Код:
#define YOUR_COLOR Hexcodehere



Re: Script Request Thread #4 - Str4ndb3rg - 09.09.2010

I get an error when im compiling:
Код:
public OnPlayerCommandText(playerid, cmdtext[])
if( !strcmp( cmdtext, "/help", true ))
{
    SendClientMessage( playerid, 0xFFFF00FF, "Your text in yellow" );
    //add more
    return true;
}
The error:


Код:
C:\Users\Alle\Desktop\GTA SA Shit\GTA Server\gamemodes\Deathmatch.pwn(218) : warning 209: function "OnPlayerCommandText" should return a value
Pawn compiler 3.2.3664              Copyright © 1997-2006, ITB CompuPhase


1 Warning.



Re: Script Request Thread #4 - ihatetn931 - 09.09.2010

pawn Код:
public OnPlayerCommandText(playerid, cmdtext[])
if( !strcmp( cmdtext, "/help", true ))
{
    SendClientMessage( playerid, 0xFFFF00FF, "Your text in yellow" );
    //add more
    return true;
}
return 1;  or //return 0; Don't rember which one
}
that should fix it.


Re: Script Request Thread #4 - Marvin81 - 09.09.2010

Hi,

I'm looking for a professional/experienced scripter with a respectable stand here on the forums to script in a unique RP server. Please PM me your portfolio and rates, if any, and we can talk further.

Thank you.


Re: Script Request Thread #4 - Scenario - 09.09.2010

Quote:
Originally Posted by ihatetn931
Посмотреть сообщение
pawn Код:
public OnPlayerCommandText(playerid, cmdtext[])
if( !strcmp( cmdtext, "/help", true ))
{
    SendClientMessage( playerid, 0xFFFF00FF, "Your text in yellow" );
    //add more
    return true;
}
return 1;  or //return 0; Don't rember which one
}
that should fix it.
It's "return 1;" because "return 0;" will just always send the 'SERVER: Unknown Command' message!


Re: Script Request Thread #4 - LarzI - 10.09.2010

You are completely wrong.
Return 0 will send the unknown command message IF the command text isnt equal to any of the commands.


Re: Script Request Thread #4 - gin - 10.09.2010

i need /cancelhit for hitman (i use GF)

EX:
if(strcmp(cmd, "/cancelhit", true) == 0)
{
if(IsPlayerConnected(playerid))
{
if(PlayerInfo[playerid][pMember] == 8 || PlayerInfo[playerid][pLeader] ==
{
if(GoChase[playerid] < 999)
{
GetPlayerName(playerid, sendername, sizeof(sendername));
GetPlayerName(hitid, giveplayer, sizeof(giveplayer));
format(string,sizeof string,"Hitman %s has canceled %s(ID:%d) contract.", sendername , giveplayer, hitid);
SendFamilyMessage(8, COLOR_YELLOW, string);
GetChased[playerid] = 999;
GoChase[playerid] = 999;
GotHit[playerid] = 0;
hitid = 999;
hitfound = 1;
}
}
else
{
SendClientMessage(playerid, COLOR_GRAD1, " You are not a Hitman!");
}
}
return 1;
}


Re: Script Request Thread #4 - Venturas - 10.09.2010

Quote:
Originally Posted by gin
Посмотреть сообщение
i need /cancelhit for hitman (i use GF)

EX:
if(strcmp(cmd, "/cancelhit", true) == 0)
{
if(IsPlayerConnected(playerid))
{
if(PlayerInfo[playerid][pMember] == 8 || PlayerInfo[playerid][pLeader] ==
{
if(GoChase[playerid] < 999)
{
GetPlayerName(playerid, sendername, sizeof(sendername));
GetPlayerName(hitid, giveplayer, sizeof(giveplayer));
format(string,sizeof string,"Hitman %s has canceled %s(ID:%d) contract.", sendername , giveplayer, hitid);
SendFamilyMessage(8, COLOR_YELLOW, string);
GetChased[playerid] = 999;
GoChase[playerid] = 999;
GotHit[playerid] = 0;
hitid = 999;
hitfound = 1;
}
}
else
{
SendClientMessage(playerid, COLOR_GRAD1, " You are not a Hitman!");
}
}
return 1;
}
Okay, there is your command. LOL