Filterscript help
#1

Hello SA:MP scripters!


today i have been wwanted to add for my RP sserver a /gout and /gin commands,
first: if i used callbacks,how to show it to other players?
second:if abouve answred,it get for me a lot of errors.
third: what to use if non of above is useless?
Reply
#2

So we have to wait to see what the commands does? Tell us what u want to do
Reply
#3

i have typed : /gout and /gin for putting a gun and get it back to hands.
and i want it work on filterscript and make changes
Reply
#4

Lol, i have no idea or seance, what ur talking
Is this what u want ?
Код:
new Pickup;
public OnPlayerDeath(playerid, killerid, reason)
{
    new Float: Pos[3];
    GetPlayerPos(playerid, Pos[0], Pos[1], Pos[2]);
    Pickup = CreatePickup(1239, 1, Pos[0], Pos[1], Pos[2], -1);
    return 1;
}

public OnPlayerPickUpPickup(playerid, pickupid)
{
    if(pickupid == Pickup)
    {
        //Give anthing you want etc...
    }
    return 1;
}
Reply
#5

hmmm,sir.it's a RP server,i don't want players to do /me takes out a gun ..etc

i want a something like /gout deagle and it say : %s takes out a desert eagle.etc...
and for all weapons too and the same for /gin but be : %s tooks his gun inside his (wallet,anything)
Reply
#6

pawn Код:
#include <zcmd>
CMD:gout(playerid,params[])
{
new name[MAX_PLAYER_NAME];
GetPlayerName(playerid,name,sizeof(name));
new string[250];
format(string,sizeof(string),"%s has taken out the gun",name);
SendClientMessageToAll(playerid,COLOR_YELLOW,string);
return 1;
}

CMD:gin(playerid,params[])
{
new name[MAX_PLAYER_NAME];
GetPlayerName(playerid,name,sizeof(name));
new string[250];
format(string,sizeof(string),"%s holsters the gun",name);
SendClientMessageToAll(playerid,COLOR_YELLOW,string);
return 1;
}
Reply
#7

Hmmmm,i will try it,but when i load the Filterscript file is say : load failed?

AND THERE IS an erros on your line :

SendClientMessageToAll(playerid, COLOR_YELLOW, string);

the errors:
D:\Programmes\0.3z korp\filterscripts\RPA.pwn(4 : error 029: invalid expression, assumed zero
D:\Programmes\0.3z korp\filterscripts\RPA.pwn(4 : warning 215: expression has no effect
D:\Programmes\0.3z korp\filterscripts\RPA.pwn(4 : error 001: expected token: ";", but found ")"
D:\Programmes\0.3z korp\filterscripts\RPA.pwn(4 : error 029: invalid expression, assumed zero
D:\Programmes\0.3z korp\filterscripts\RPA.pwn(4 : fatal error 107: too many error messages on one line

Compilation aborted.Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase


4 Errors.
Reply
#8

Hello!
Reply
#9

Okay,it's noww have the abilty to be loaded.
but i removed the SendClientMessageToAll(playerid, COLOR_YELLOW, string);
becuase it's bugging the script,and now,the command,works but not showing any thing!
Reply
#10

Quote:
Originally Posted by 7Ahmad7
Посмотреть сообщение
hmmm,sir.it's a RP server,i don't want players to do /me takes out a gun ..etc

i want a something like /gout deagle and it say : %s takes out a desert eagle.etc...
and for all weapons too and the same for /gin but be : %s tooks his gun inside his (wallet,anything)
you dont have to call me sir, call me Dipto. i m not anyone special ....... lol
Reply


Forum Jump:


Users browsing this thread: 3 Guest(s)