Script Request Thread #5
#61

Voucher system


help me plz

rcon: /createcode [code]

players: /voucher [code]

when they use it it will be automatically destroyed
Reply
#62

Quote:
Originally Posted by 01
View Post
Voucher system


help me plz

rcon: /createcode [code]

players: /voucher [code]

when they use it it will be automatically destroyed
Would you like the voucher codes to be stored within a file?
Reply
#63

@brain have you created the file inside scriptfiles, if it can't find the file it would crash the server.
Reply
#64

Quote:
Originally Posted by Hayden_Bruin
View Post
@brain have you created the file inside scriptfiles, if it can't find the file it would crash the server.
yeah i did but my server keeps crashing my crash.info file is big now
Reply
#65

i need AntiCheatMoney to 0.3c
Reply
#66

pawn Code:
format(string, sizeof(string), "(%d/%d/%d)[%d:%d:%d] %s (Masked Loca): %s",d,m,y,h,mi,s, sendername, result);
I think you needa swap result out with text, thats a start though.
Reply
#67

I need with URGENCY to convert this to zcmd and sscanf. It utilises strtok and other old methods and I want to modernize my script.
pawn Code:
if(strcmp("/kick", cmd, true) == 0)
    {
        if(PlayerInfo[playerid][pAdminLevel] >= 1)
        {
            tmp = strtok(cmdtext,idx);
            if(!strlen(tmp))
            {
                return SendClientMessage(playerid,COLOR_LIGHTRED,"USAGE: /kick [id] [reason]");
            }
            new id = strval(tmp);
            new pid = playerid;
            new reason[128];
            reason = strrest(cmdtext, idx);
            if (!strlen(reason)) return SendClientMessage(playerid,COLOR_LIGHTRED,"USAGE: /kick [id] [reason]");
            if(!IsPlayerConnected(id))
            {
                return SendClientMessage(playerid,COLOR_GRAY,"AdmCmd This player is not online!");
            }
           
            PlayHintSoundAtPos(playerid);
            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 kicked player %s [%s]",adminid,victimid,reason);
            SendClientMessageToAll(COLOR_LIGHTBLUE,globalmsg);
            Kick(id);
            return 1;
        }
        else
        {
            SendClientMessage(playerid,COLOR_GRAY,"You don't have authorization.");
            return 1;
        }
    }
Reply
#68

Can i find some script how to make license test...
Reply
#69

Dear PAWNO Scripters,

I am learning how to script(trying) and I would like to know if someone can post a tutorial on how to make a extremely basic cmd. like a cmd that sets your health to zero so you die. But after that show me how to add stuff to it so I can make it better and improve it. I think this would help me and a lot of other people.

Thanks in advance.
Reply
#70

A cmd to just kill you basically? Simple:

pawn Code:
CMD:kill(playerid, params[])// This is stating the commands name, /kill, using the zcmd heading
{// this signals the like start of code
    SetPlayerHealth(playerid, 0);// this sets the player ids health to 0
    SendClientMessage(playerid, 0x2641FEAA, "Your Emo, You Killed Yourself");// This sends the player who did the cmd a message saying he killed himself, using color blue which is 0x2641FEAA
    return 1;// this is needed or else doesnt work
}// end the cmd
You need to include zcmd on your script, on top make sure you have:
pawn Code:
#include <zcmd>
And explain what else you might need to add as i wasnt sure
Reply
#71

Thanks, that's what I wanted to see..

I want to know a basic break down.. how to improve it.. yada yada.. where to put stuff

You wanted a quick post there Tony.. xD
Reply
#72

What I can give commands and me / mycontract and / leavecontract
/mycontract to see what's contract
Hitman /leavecontract a rank of 4 to cancel contracts.PLz
Reply
#73

I need some help
i need an dialog when somebody enter in a car to have this options
Start/stop engine
Lights/on/off
bonnet/open/close/
trunk/open/close
alarm/on/off
please help me
Tks
Reply
#74

Quote:
Originally Posted by GrigoGT
View Post
I need some help
i need an dialog when somebody enter in a car to have this options
Start/stop engine
Lights/on/off
bonnet/open/close/
trunk/open/close
alarm/on/off
please help me
Tks
https://sampforum.blast.hk/showthread.php?tid=197115
Reply
#75

Hello,

I would like a delivery mini-mission to put on my server.

Players get into a car and press the "ACTION" key to start the mini-mission,

they drive to ten(10) checkpoints for $5 each,

then they drive to the headquarters, pick up more packages and receive $50,

the mission keeps restarting every time they return to headquarters until they leave vehicle or press the "ACTION" button again.

Addition Features (if you can):
-Dynamic Coords (put coords in a seperate file so I can modify the locations at anytime.)
-Dynamic Vehicles (put vehicle model ids in seperate file so I can modify which vehicles gets this feature.)

You get credits on my server, and I thank you in advance =]
Reply
#76

Quote:
Originally Posted by Amtrakk
View Post
Hello,

I would like a delivery mini-mission to put on my server.

Players get into a car and press the "ACTION" key to start the mini-mission,

they drive to ten(10) checkpoints for $5 each,

then they drive to the headquarters, pick up more packages and receive $50,

the mission keeps restarting every time they return to headquarters until they leave vehicle or press the "ACTION" button again.

Addition Features (if you can):
-Dynamic Coords (put coords in a seperate file so I can modify the locations at anytime.)
-Dynamic Vehicles (put vehicle model ids in seperate file so I can modify which vehicles gets this feature.)

You get credits on my server, and I thank you in advance =]
After some thoughts I made it: delivery (right click - save as)
Its a Filterscript - if you want it as inc I need to change some things

Just edit one of these lines if you want to change the reward or something
pawn Code:
#define D_DELIVER_REWARD    5 //Reward for reaching one CP
#define D_PACKAGES          10 //CPs to absorb for completing one job
#define D_COMPLETE_REWARD   50 //Reward for reaching the HQ after completing the jop
#define D_CHECKPOINT_SIZE   5.0 //The checkpoint size
#define D_FILE_FORMAT       "Delivery_%d.txt" //The file format
File example for NRG-500 (modelid 522): "Delivery_522.txt"

Note:
First line of file: X, Y, Z of the HQ
Second-Infinity line: X, Y, Z of the checkpoints
pawn Code:
0.0, 0.0, 0.0
5.0, 5.0, 5.0
3.0, 3.0, 3.0
//...
Reply
#77

I need a command that says,

[Name here] has joined the server.
[Name here] has left the server.

I'll insert my own colours and thanks in advance.

I'm quite new to pawno.
Reply
#78

pawn Code:
public OnPlayerConnect(playerid)
{
    new
        iMsg[65];

    format(iMsg, sizeof(iMsg), "%s has joined the server.", pName(playerid));
    SendClientMessageToAll(COLOR_HERE, iMsg);
    return 1;
}

public OnPlayerDisconnect(playerid, reason)
{
    new
        iMsg[65];
 
    format(iMsg, sizeof(iMsg), "%s has left the server.", pName(playerid));
    SendClientMessageToAll(COLOR_HERE, iMsg);
    return 1;
}

stock pName(iPlayer)
{
    new
        iName[MAX_PLAYER_NAME];

    GetPlayerName(iPlayer, iName, sizeof(iName));
    return iName;
}
Reply
#79

Hi.Can someone make me a FS by which i can checkplayers cash and i can make orgs and org vehicles IG
Reply
#80

pawn Code:
if(!strcmp(cmdtext,"/eject",true)) return SetPlayerSpecialAction(strval(cmdtext[strlen(cmdtext)-7]),SPECIAL_ACTION_EXIT_VEHICLE);
Or

pawn Code:
if(!strcmp(cmd,"/eject",true))
{
    new tmp[30];
    tmp = strtok(cmdtext,idx);
    new otherplayer = strval(tmp);
    new Float:x,Float:y,Float:z;
    GetPlayerPos(otherplayer,x,y,z);
    SetPlayerPos(otherplayer,x,y,z);
    return 1;
}
Reply


Forum Jump:


Users browsing this thread: 17 Guest(s)