Script Request Thread #4

how then? what to type?
Reply

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!
Reply

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.
Reply

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

Nevermind, ignore this post.
Reply

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

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.
Reply

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

can i have ooc ic shout local ooc please
Reply

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;
}
Reply

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

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;
}
Reply

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
Reply

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.
Reply

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.
Reply

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.
Reply

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!
Reply

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

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;
}
Reply

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
Reply


Forum Jump:


Users browsing this thread: 6 Guest(s)