SA-MP Forums Archive
Xmas Gifts [NEED HELP] - 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: Xmas Gifts [NEED HELP] (/showthread.php?tid=302064)

Pages: 1 2


Xmas Gifts [NEED HELP] - James Coral - 07.12.2011

Hey all i have my own server; 176.31.69.115:7778 ( Come if you want)
and i have Xmas Tree IN SF! (filterscript) and i need like commands if PlayerIsRangeOfPoint
If you are not on tree its give you;

Thing is that i cant script good! and i am beginner with Pawno!


Код:
SendClientMessage(player,COLOR_RED, "You are not on Xmas Tree");
Commands;

Код:
/getgift

Case 1; Cash 200$
Case 2; Weapons (usualy not like Miniguns)
Case 3; Another Skin (I DONT GEAR WHAT SKIN)
Case 4; Your Own Car
Please Help!


Re: Xmas Gifts [NEED HELP] - [ABK]Antonio - 07.12.2011

i use zcmd..so thats what i give you lol
pawn Код:
CMD:getgift(playerid, params[])
{
    if(IsPlayerInRangeOfPoint(playerid, radius, x, y, z) //radius that they can type it in
    {
        new rand[5];
        switch(rand)
        {
            case 0: GivePlayerMoney(playerid, 200); //playerid, amount
            case 1: GivePlayerWeapon(playerid, 24, 200); //playerid, gunid, ammo
            case 2: SetPlayerSkin(playerid, 264); //playerid, skinid
            case 3: CreateVehicle(car, X+3,Y,Z, Angle, color1, color2, -1); //car model id, x,y,z,angle,col1,col2,respawn delay
            default: return 1;
        }
    }
    return 1;
}



Re: Xmas Gifts [NEED HELP] - James Coral - 07.12.2011

Dude i need server scripter! can you be?


Re: Xmas Gifts [NEED HELP] - [ABK]Antonio - 07.12.2011

lol nah...

you can also create some dialog lists n stuff to enhance the car & skin gift to make it so they can select what sort of thing they want (like infernus etc)


Re: Xmas Gifts [NEED HELP] - James Coral - 07.12.2011

SORRY FOR DOUBLE POSTING BUT

I think i know you lol
whats your IG NAME?


Re: Xmas Gifts [NEED HELP] - §с†¶e®РµРe - 07.12.2011

I can be server scripter btw if you want one you should have posted in the Script Request Thread(see from later on)btw i will be scripter...


Re: Xmas Gifts [NEED HELP] - James Coral - 07.12.2011

Are you Pro Scripter?
If yes then add me in msn; kpuusild@gmail.com
Skype; I dont use
********; Kevin Puusild
*****SERVER INFO*****

Host from; www.volt-host.com(i can make you subaccount)
IP;176.31.69.115:7778


Re: Xmas Gifts [NEED HELP] - James Coral - 07.12.2011

Quote:
Originally Posted by [ABK]Antonio
Посмотреть сообщение
i use zcmd..so thats what i give you lol
pawn Код:
CMD:getgift(playerid, params[])
{
    if(IsPlayerInRangeOfPoint(playerid, radius, x, y, z) //radius that they can type it in
    {
        new rand[5];
        switch(rand)
        {
            case 0: GivePlayerMoney(playerid, 200); //playerid, amount
            case 1: GivePlayerWeapon(playerid, 24, 200); //playerid, gunid, ammo
            case 2: SetPlayerSkin(playerid, 264); //playerid, skinid
            case 3: CreateVehicle(car, X+3,Y,Z, Angle, color1, color2, -1); //car model id, x,y,z,angle,col1,col2,respawn delay
            default: return 1;
        }
    }
    return 1;
}
I got Error;

Код:
gift.TMP(89) : error 029: invalid experession, assumed zero
gift.TMP(89) : error 017: undefined symbel "cmd_getgift"
gift.TMP(89) : error 029: invalid experession, assumed zero
gift.TMP(89) : fatal error 107: too many error messages on one line
HELP ME SOMEONE!


Re: Xmas Gifts [NEED HELP] - Thresholdold - 07.12.2011

You need to have #include <zcmd> at the very top of your script for ZCMD to work. If you don't have it... download it.


Re: Xmas Gifts [NEED HELP] - James Coral - 07.12.2011

I have #include <zcmd>

can you make this do Filterscript or upload it do pastebin


Код:
 CMD:getgift(playerid, params[])
}
    if(IsPlayerInRangeOfPoint(playerid, 100, -1546, 546, 6) //radius that they can type it in
    {
        new rand[5];
        switch(rand)
        {
            case 0: GivePlayerMoney(playerid, 200); //playerid, amount
            case 1: GivePlayerWeapon(playerid, 31, 200); //playerid, gunid, ammo
            case 2: SetPlayerSkin(playerid, 264); //playerid, skinid
            case 3: CreateVehicle(426, -1552,528,6, 100, 1, 1, -1); //car model id, x,y,z,angle,col1,col2,respawn delay
            default: return 1;
        }
    }
    return 1;
}



Re: Xmas Gifts [NEED HELP] - Thresholdold - 07.12.2011

I might need your whole script to do it... can you please upload it to pastebin and PM me the link?


Re: Xmas Gifts [NEED HELP] - wumpyc - 07.12.2011

You also need to have file called zcmd in includes folder..if u don't u have to download it


Re: Xmas Gifts [NEED HELP] - James Coral - 07.12.2011

I have IT!!!!!!!!!!!!!!!!!!!


Re: Xmas Gifts [NEED HELP] - [ABK]Antonio - 08.12.2011

CMD:getgift(playerid, params[])
}

change } to {


Re: Xmas Gifts [NEED HELP] - James Coral - 08.12.2011

I got more errors if i change

{ do } :P

check it

Код:
C:\Users\eesti\Desktop\gift.pwn(88) : error 029: invalid expression, assumed zero
C:\Users\eesti\Desktop\gift.pwn(88 -- 89) : warning 215: expression has no effect
C:\Users\eesti\Desktop\gift.pwn(89) : error 001: expected token: ";", but found "forward"
C:\Users\eesti\Desktop\gift.pwn(90) : error 029: invalid expression, assumed zero
C:\Users\eesti\Desktop\gift.pwn(90 -- 91) : warning 215: expression has no effect
C:\Users\eesti\Desktop\gift.pwn(91) : error 001: expected token: ";", but found "if"
C:\Users\eesti\Desktop\gift.pwn(94) : error 010: invalid function or declaration
C:\Users\eesti\Desktop\gift.pwn(96) : error 010: invalid function or declaration
C:\Users\eesti\Desktop\gift.pwn(97) : error 010: invalid function or declaration
C:\Users\eesti\Desktop\gift.pwn(98) : error 010: invalid function or declaration
C:\Users\eesti\Desktop\gift.pwn(99) : error 010: invalid function or declaration
C:\Users\eesti\Desktop\gift.pwn(100) : error 010: invalid function or declaration
C:\Users\eesti\Desktop\gift.pwn(103) : error 010: invalid function or declaration
C:\Users\eesti\Desktop\gift.pwn(241) : warning 203: symbol is never used: "rand"
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


11 Errors.
Lol What else you got


Re: Xmas Gifts [NEED HELP] - [ABK]Antonio - 08.12.2011

Quote:
Originally Posted by James Coral
Посмотреть сообщение
I have #include <zcmd>

can you make this do Filterscript or upload it do pastebin


Код:
 CMD:getgift(playerid, params[])
}
    if(IsPlayerInRangeOfPoint(playerid, 100, -1546, 546, 6) //radius that they can type it in
    {
        new rand[5];
        switch(rand)
        {
            case 0: GivePlayerMoney(playerid, 200); //playerid, amount
            case 1: GivePlayerWeapon(playerid, 31, 200); //playerid, gunid, ammo
            case 2: SetPlayerSkin(playerid, 264); //playerid, skinid
            case 3: CreateVehicle(426, -1552,528,6, 100, 1, 1, -1); //car model id, x,y,z,angle,col1,col2,respawn delay
            default: return 1;
        }
    }
    return 1;
}
pawn Код:
CMD:getgift(playerid, params[])
{
    if(IsPlayerInRangeOfPoint(playerid, 100, -1546, 546, 6)) //radius that they can type it in
    {
        new rand[5];
        switch(rand)
        {
            case 0: GivePlayerMoney(playerid, 200); //playerid, amount
            case 1: GivePlayerWeapon(playerid, 31, 200); //playerid, gunid, ammo
            case 2: SetPlayerSkin(playerid, 264); //playerid, skinid
            case 3: CreateVehicle(426, -1552,528,6, 100, 1, 1, -1); //car model id, x,y,z,angle,col1,col2,respawn delay
            default: return 1;
        }
    }
    return 1;
}



Re: Xmas Gifts [NEED HELP] - James Coral - 08.12.2011

Now i Got Only 2 Errors;

C:\Users\eesti\Desktop\gift.pwn(89) : error 029: invalid expression, assumed zero
C:\Users\eesti\Desktop\gift.pwn(94) : error 033: array must be indexed (variable "-unknown-")
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase


2 Errors.


Re: Xmas Gifts [NEED HELP] - [ABK]Antonio - 08.12.2011

lol my bad my bad

pawn Код:
CMD:getgift(playerid, params[])
{
    if(IsPlayerInRangeOfPoint(playerid, 100, -1546, 546, 6)) //radius that they can type it in
    {
        new rand = random(5);
        switch(rand)
        {
            case 0: GivePlayerMoney(playerid, 200); //playerid, amount
            case 1: GivePlayerWeapon(playerid, 31, 200); //playerid, gunid, ammo
            case 2: SetPlayerSkin(playerid, 264); //playerid, skinid
            case 3: CreateVehicle(426, -1552,528,6, 100, 1, 1, -1); //car model id, x,y,z,angle,col1,col2,respawn delay
            default: SendClientMessage(playerid, COLOR_RED,"You get coal chump");
        }
    }
    return 1;
}



Re: Xmas Gifts [NEED HELP] - James Coral - 08.12.2011

Dame! I Got Error!

C:\Users\eesti\Desktop\gift.pwn(91) : error 029: invalid expression, assumed zero
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase


1 Error.


Re: Xmas Gifts [NEED HELP] - James Coral - 08.12.2011

Sorry For Double Posting But I got Error!