SA-MP Forums

Go Back   SA-MP Forums > SA-MP Scripting and Plugins > Filterscripts

Reply
 
Thread Tools Display Modes
Old 13/09/2018, 12:11 PM   #11
Variable™
Gangsta
 
Variable™'s Avatar
 
Join Date: Jul 2015
Location: Somewhere...
Posts: 747
Reputation: 153
Default Re: Donor System

Quote:
Originally Posted by RogueDrifter View Post
This is so bad, theres too much shit in it i'm sorry but i can't compliment this, i wonder if the people above even viewed the code??

Your usage of vars, enum, naming and the god thing wont even work i don't understand if this was copy pasted or what but theres absolutely no good in it at all.
I said keep it up, which means keep improving, because I have no interest in pointing out code mistakes but rather let him learn by himself. I understand it is below average but yet he's new and taking newbies down by non-constructive criticism will never make them improve. At least he tried to do something.
__________________
MW4 Community
Variable™ is online now   Reply With Quote
Old 13/09/2018, 01:05 PM   #12
RogueDrifter
High-roller
 
RogueDrifter's Avatar
 
Join Date: Dec 2017
Location: SA-MP Drifting world.
Posts: 1,170
Reputation: 351
Default Re: Donor System

Quote:
Originally Posted by Variable™ View Post
I said keep it up, which means keep improving, because I have no interest in pointing out code mistakes but rather let him learn by himself. I understand it is below average but yet he's new and taking newbies down by non-constructive criticism will never make them improve. At least he tried to do something.
All i read was blah blah blah, excuses to get a post count, if you won't help the poster dont post useless shit that will harm him and others reading this, all you said was 'keep it up' that hints this works and has no problems while its a complete disaster, your comment was simply shit unlike my comment which was constructive criticism that pointed out mistakes that'll help him and notify others that this doesnt even work.
__________________

[Github]:Link [Gists]:Link [Forum]:Link [Server]:Link [Discord]:Link



Last edited by RogueDrifter; 13/09/2018 at 10:21 PM.
RogueDrifter is offline   Reply With Quote
Old 13/09/2018, 01:13 PM   #13
Bolex_
Gangsta
 
Bolex_'s Avatar
 
Join Date: Aug 2015
Location: Republic Of Croatia
Posts: 594
Reputation: 116
Default Re: Donor System

Quote:
Originally Posted by RogueDrifter View Post
All i read was blah blah blah, excuses to get a post count, if you won't help the poster dont post useless shit that will harm him and others reading this, all you said was 'keep it up' that hints this works and has no problems while its a complete disaster, your comment was simply shit unlike my comment which was constructive criticizim that pointed out mistakes that'll help him and notify others that this doesnt even work.
They can't all be as good as you at first, but you made a point.
Bolex_ is offline   Reply With Quote
Old 13/09/2018, 01:33 PM   #14
Variable™
Gangsta
 
Variable™'s Avatar
 
Join Date: Jul 2015
Location: Somewhere...
Posts: 747
Reputation: 153
Default Re: Donor System

Quote:
Originally Posted by RogueDrifter View Post
All i read was blah blah blah, excuses to get a post count, if you won't help the poster dont post useless shit that will harm him and others reading this, all you said was 'keep it up' that hints this works and has no problems while its a complete disaster, your comment was simply shit unlike my comment which was constructive criticizim that pointed out mistakes that'll help him and notify others that this doesnt even work.
Excuses to get a post count is something you should be telling yourself. I can post any useless shit wherever I want and what you can do is 'reporting' it. Keep it up means keep improving and it's something to give him confidence in learning and releasing better stuff. You pointed out his mistakes without showing any 'better' examples of your own. Do you think a newbie will bother searching what you were just saying or finding better substitutions? You are just telling him he did shit and mentioned his mistakes without showing replacements of the shit he did, which makes your post a useless piece of shit as well.
__________________
MW4 Community
Variable™ is online now   Reply With Quote
Old 13/09/2018, 02:34 PM   #15
Danielknow
Big Clucker
 
Join Date: May 2018
Location: United States
Posts: 57
Reputation: 1
Default Re: Donor System

nice work
Danielknow is offline   Reply With Quote
Old 13/09/2018, 02:36 PM   #16
CaptainBoi
Huge Clucker
 
Join Date: May 2018
Location: India
Posts: 256
Reputation: 25
Default Re: Donor System

LoL Roguedrifter was right after he said about the code i checked it whole and i found alot shits in it
replace your code with this i have fixed the whole code for you and made it in good indentations.

PHP Code:
//Includes//
#include <a_samp>
#include <sscanf>
#include <zcmd>

//Enumerators//
enum pData
{
    
God,
    
Maptp,
    
dlvl
};
new 
PlayerData[MAX_PLAYERS][pData];

public 
OnFilterScriptInit()
{
    print(
"\n--------------------------------------");
    print(
" Donor System By SamP_Gamer Aka Nikhil");
    print(
"--------------------------------------\n");
    return 
1;
}

public 
OnFilterScriptExit()
{
    return 
1;
}

//OnPlayerClickMap [Maptp]//
public OnPlayerClickMap(playeridFloat:fXFloat:fYFloat:fZ)
{
    if ((
IsPlayerAdmin(playerid) || PlayerData[playerid][dlvl] >= 1) && PlayerData[playerid][Maptp]!=0
    {
        
SetPlayerInterior(playerid0);
        
SetPlayerVirtualWorld(playerid0);
        
SetPlayerPos(playeridfXfYfZ);
    }
    return 
1;
}

CMD:setdonor(playeridparams[])
{
    if(!
IsPlayerAdmin(playerid))return 0;
    new 
levelsstr[128], ID;
    if(
sscanf(params,"ui"IDlevels)) return SendClientMessage(playerid,0xFF9900AA"USAGE: /setdonor [ID] [1-setL1, 2-setL2, 0-remove]");
    if(
levels 2) return SendClientMessage(playerid,0xFF0000FF,"Donor level Are between 1-2");
    if(!
IsPlayerConnected(ID))return SendClientMessage(playerid,0xFF0000FF,"That user is not connected.");
    if(
PlayerData[ID][dlvl] == levels) return SendClientMessage(playerid,0xFF0000FF"ERROR: That person is already donor");
       if(
levels == 0)
       {
        
format(strsizeof(str),"An Admin has set your Donor stats level to %d",levels);
        
SendClientMessage(ID0xFF9900AAstr);
         
format(strsizeof(str),"You had set %s to Donor"PlayerName(ID));
        
SendClientMessage(playerid,0xFF9900AA,str);
           
PlayerData[ID][dlvl] = levels;
           return 
1;
    }
    
format(strsizeof(str),"%s is Donor on server.",PlayerName(ID));
    
SendClientMessageToAll(0xFF9900AAstr);
    
format(strsizeof(str),"You had set %s to donor!",PlayerName(ID));
    
SendClientMessage(playerid,0xFF9900AA,str);
    
PlayerData[ID][dlvl] = levels;
    return 
1;
}

CMD:god(playeridparams[])
{
    if(
PlayerData[playerid][dlvl] < 1) return 0;

    if(
PlayerData[playerid][God] == 0)
    {
        
SetPlayerHealth(playerid9999999999.0);
        
SetPlayerArmour(playerid9999999999.0);
        
SendClientMessage(playerid0xFF9900AA"God Mode [ON].");
        
PlayerData[playerid][God] = 1;
    }
    else if(
PlayerData[playerid][God] == 1)
    {
        
SetPlayerHealth(playerid100.0);
        
SetPlayerArmour(playerid100.0);
        
SendClientMessage(playerid0xFF9900AA"God Mode [OFF].");
        
PlayerData[playerid][God] = 0;
    }
    return 
1;
}
CMD:healplayer(playeridparams[])
{
    new 
targetid;
    if(
PlayerData[playerid][dlvl] < 1) return 0;
    if(
sscanf(params,"u"targetid)) return SendClientMessage(playerid0xFFFFFFF,"Usage : /healplayer [ID]");
    if(!
IsPlayerConnected(targetid)) return SendClientMessage(playerid0xFFFFFFF,"That player is not connected to the server!");
    
GivePlayerMoney(playerid, -500);
    
SetPlayerHealth(targetid100);
    return 
1;
}

CMD:announce(playerid,params[])
{
    if(
PlayerData[playerid][dlvl] < 1) return 0;
    new 
text[60];
     if(
sscanf(params,"s[60]",text))
     return 
SendClientMessage(playerid0xFFFFFFF"USAGE: /announce [text]");
     
GameTextForAll(text,5000,3);
     
GivePlayerMoney(playerid, -3000);
     return 
1;
}

CMD:gotopos(playeridparams[])
{
  if(
PlayerData[playerid][dlvl] < 1) return 0;
  new 
Float:xFloat:yFloat:zinterior;
  if(
sscanf(params"fffd"xyzinterior)) return SendClientMessage(playerid0xFF0000AA"Usage: /gotopos <x> <y> <z> <interior>");
  
SetPlayerInterior(playeridinterior);
  
SetPlayerPos(playeridxyz);
  return 
1;
}

CMD:armour(playeridparams[])
{
    new 
targetid;
    if(
PlayerData[playerid][dlvl] < 1) return 0;
    if(
sscanf(params,"u"targetid)) return SendClientMessage(playerid0xFFFFFFF,"Usage : /armour [ID]");
    if(!
IsPlayerConnected(targetid)) return SendClientMessage(playerid0xFFFFFFF,"That player is not connected to the server!");
    
GivePlayerMoney(playerid, -1000);
    
SetPlayerArmour(targetid100);
    return 
1;
}

CMD:dcmds(playeridparams[])
{
   if(
PlayerData[playerid][dlvl] < 1) return 0;
   if(
PlayerData[playerid][dlvl] == 1)
   {
    
SendClientMessage(playerid0xFDF700FF,"=============Donor Commands=============");
    
SendClientMessage(playerid0xA82B00FF,"Donor cmds : /armour, /gotopos, /announce, /healplayer, /god,");
   }
   if(
PlayerData[playerid][dlvl] == 2)
   {
    
SendClientMessage(playerid0xA82B00FF,"Donor L1 cmds : /armour, /gotopos, /announce, /healplayer, /god,");
    
SendClientMessage(playerid0xA82B00FF,"Donor L2 cmds : /dsay, /maptp ");
   }
   return 
1;
}

CMD:dsay(playeridparams[])
{
 new 
tmp[256], string[256];
 if(
PlayerData[playerid][dlvl] < 2) return 0;
 if (
sscanf(params"s[128]"tmp)) return SendClientMessage(playerid0xA82B00FF"Usage: /dsay [message]");
 
format(stringsizeof(string), "* {FF9900}Donor {FFFFFF}- %s: %s"PlayerName(playerid), tmp);
 
SendClientMessageToAll(0xA82B00FFstring);
 
GivePlayerMoney(playerid, -2000);
 return 
1;
}

CMD:maptp(playeridparams[])
{
    if(
PlayerData[playerid][dlvl] < 2) return 0;
    if(
PlayerData[playerid][Maptp]==0)
    {
        
PlayerData[playerid][Maptp]=1;
        
SendClientMessage(playerid0xA82B00FF"Map Teleport {FF0000}[ON].");
        return 
1;
    }
    if(
PlayerData[playerid][Maptp]==1)
    {
        
PlayerData[playerid][Maptp]=0;
        
SendClientMessage(playerid0xA82B00FF"Map Teleport {FF0000}[OFF].");
        return 
1;
    }
    return 
1;
}

//Stocks//
PlayerName(playerid)
{
 new 
playerName[MAX_PLAYER_NAME];
 
GetPlayerName(playeridplayerNameMAX_PLAYER_NAME);
 return 
playerName;

__________________
Code:
Releases
[FilterScript] Dynamic MySQL GPS System
[Tutorial] How to make TDM Team Selection.
[Include] moneybar.inc || Coloured Moneybar || Released
[Tutorial] PAWN Compiler In Notepad++
[FilterScript] Perks System (v: [On Update]) [DINI, ZCMD]
[FilterScript] Realistic Transmission Speedometer
CaptainBoi is offline   Reply With Quote
Old 13/09/2018, 03:01 PM   #17
NikhilMeena
Little Clucker
 
NikhilMeena's Avatar
 
Join Date: Sep 2018
Location: India
Posts: 11
Reputation: 7
Default Re: Donor System

RogueDrifter Try Version 3

V3 have no bugs
__________________
My Work
[SIZE="2"][FilterScript]Tricky Donor System

Donate
Donate me to improve my skills 😀
NikhilMeena is offline   Reply With Quote
Old 13/09/2018, 06:37 PM   #18
BanSilog
Big Clucker
 
BanSilog's Avatar
 
Join Date: Nov 2017
Location: Philippines
Posts: 102
Reputation: 16
Default Re: Donor System

Keep up the good work buddy
__________________


[WW] | [DW]
BanSilog is offline   Reply With Quote
Old 14/09/2018, 12:01 PM   #19
NikhilMeena
Little Clucker
 
NikhilMeena's Avatar
 
Join Date: Sep 2018
Location: India
Posts: 11
Reputation: 7
Default Re: Donor System

Thanks BanSilog

I am working on my new admin system soon i will publish it on samp forums
__________________
My Work
[SIZE="2"][FilterScript]Tricky Donor System

Donate
Donate me to improve my skills 😀
NikhilMeena is offline   Reply With Quote
Old 14/09/2018, 12:41 PM   #20
BanSilog
Big Clucker
 
BanSilog's Avatar
 
Join Date: Nov 2017
Location: Philippines
Posts: 102
Reputation: 16
Default Re: Donor System

Quote:
Originally Posted by NikhilMeena View Post
Thanks BanSilog

I am working on my new admin system soon i will publish it on samp forums
Goodluck.
__________________


[WW] | [DW]
BanSilog is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
donor cap Xviper1234 Scripting Help 2 14/03/2015 01:48 PM
not DONOR but can choose donor class PowerF Scripting Help 3 26/01/2015 03:08 PM
[FilterScript] mzAdmin - Admin/Donor System | 20+ Admin Commands [v1] mobiliz Filterscripts 11 28/05/2014 10:39 AM
[FilterScript] Donor System [VIP system] 5 Ranks Zcmd V1.0 RafaelZam Filterscripts 10 23/12/2013 07:04 AM
Donor points system filterscript [COD5]DarKnight Scripting Help 10 05/09/2012 10:21 PM


All times are GMT. The time now is 04:47 AM.


Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2018, Jelsoft Enterprises Ltd.