I Want To Put The Code Of Fileterscript In MY Gamemode
#1

Please tell me how i can transform the code of my fileterscript to my gamemode
Reply
#2

Hmm, u are beginner, so it will not be easy for you to understand.

But its really easy, just copy from filterscript to gamemode, you copy the code witch is added by owner of fs, you dont need to copy main callbacks. I will give you example:

this will be filterscript:
PHP код:
public OnPlayerConnect(playerid) {
    
SendClientMessage(playerid,-1,"Filterscript");
    return 
1;
    } 
and this will be gamemode:
PHP код:
public OnPlayerConnect(playerid) {
    return 
1;
    } 
and what you only copy is this:
PHP код:
SendClientMessage(playerid,-1,"Filterscript"); 
and final result in you gamemode is:
PHP код:
public OnPlayerConnect(playerid) {
    
SendClientMessage(playerid,-1,"Filterscript");
    return 
1;
    } 
but lets say if you have custom functions in your filterscipt like this:
PHP код:
forward Test123();
public 
Test123() {
    
//some code blaahhh...
    
return 1;
    } 
you will need to copy it whole to your gamemode, like this, this is now how should look like ur gamemode:
PHP код:
public OnPlayerConnect(playerid) {
    
SendClientMessage(playerid,-1,"Filterscript");
    return 
1;
    }
forward Test123();
public 
Test123() {
    
//some code blaahhh...
    
return 1;
    } 
and vars like new,bool... in your filterscript you just copy it to your gamemode...
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)