New Idea
#1

Today i had an idea as i was going rambo on everyone on my server. And i thought of a new level sceme. Every one starts at Rank 0 and then when u kill some one who is rank 1 you become rank 1 and the person u killed is rank 0. but if you killed a rank 6 and you were 0, you would become 1 and the person you killed - 5. so you gain a rank for killing and drop a rank for being killed. The rank would be shown as score (Alt > name > ID > SCORE > ping) and the person who is like rank 10+ gets to have a weapon (shotgun) and rank 0s have pistols. Could some one just reply saying if it would be possible and if they know how could they..?
Reply
#2

This can be easily done. Look at a few rank system filterscripts and play around with it
Reply
#3

PHP Code:
new gVar_Rank[MAX_PLAYERS]; //an array defined as a variable
public OnPlayerDeath(playeridkilleridreason// on player death function with set parameters (player, the killer, the reason)
{
    
gVar_Rank[killerid]++; // will add 1 value when the killer kills a person
    
gVar_Rank[playerid]--; // will remove 1 value to the player in which dies
    
    
if(gVar_Rank[killerid] < 10) { GivePlayerWeapon(killerid2250 // if the killer's rank is less than 10 they will get a pistol
    
else if (gVar_Rank[killerid] == 10 GivePlayerWeapon(killerid2550 // if rank value 10 they will get a shotgun
    
else if (gVar_Rank[killerid] == 20 GivePlayerWeapon(killerid2550 // if 20 they will get deagle
    
return 1//returning the compound code as true.

Reply
#4

Quote:
Originally Posted by Kush
View Post
PHP Code:
new gVar_Rank[MAX_PLAYERS];
public 
OnPlayerDeath(playeridkilleridreason)
{
    
gVar_Rank[killerid]++;
    
gVar_Rank[playerid]--;
    
    if(
gVar_Rank[killerid] < 10) { GivePlayerWeapon(killerid2250 }
    else if (
gVar_Rank[killerid] == 10 GivePlayerWeapon(killerid2550 }
    else if (
gVar_Rank[killerid] == 20 GivePlayerWeapon(killerid2550 }
    return 
1;

What does that do. could you possible explain it to me..? Im sucha noob at this. im just gonna pop it in pawno and compile and GOO... :P
Reply
#5

Read everything with it's meaning.
pawn Code:
new gVar_Rank[MAX_PLAYERS]; //This is the variable where all the player's rank is stored.

public OnPlayerDeath(playerid, killerid, reason) //What all things happen when a player dies?
{
    gVar_Rank[killerid]++; //The Rank of killer goes up++
    gVar_Rank[playerid]--;  //The Rank of the person died gets low--
     
    if(gVar_Rank[killerid] < 10) { GivePlayerWeapon(killerid, 22, 50 } //if killer's rank is less than 10, give him a weapon  with id 22 and 50 ammo.
    else if (gVar_Rank[killerid] == 10) { GivePlayerWeapon(killerid, 25, 50 } //if killer's rank is '10', it gives him a weapon with id 25 and 50 ammo.
    else if (gVar_Rank[killerid] == 20) { GivePlayerWeapon(killerid, 25, 50 } //if killer's rank is '20', it gives him a weapon with id 25 and 50 ammo again.
    return 1;
}
Reply
#6

Quote:
Originally Posted by iPLEOMAX
View Post
Read everything with it's meaning.
pawn Code:
new gVar_Rank[MAX_PLAYERS]; //This is the variable where all the player's rank is stored.

public OnPlayerDeath(playerid, killerid, reason) //What all things happen when a player dies?
{
    gVar_Rank[killerid]++; //The Rank of killer goes up++
    gVar_Rank[playerid]--;  //The Rank of the person died gets low--
     
    if(gVar_Rank[killerid] < 10) { GivePlayerWeapon(killerid, 22, 50 } //if killer's rank is less than 10.
    else if (gVar_Rank[killerid] == 10) { GivePlayerWeapon(killerid, 25, 50 } //if killer's rank is '10', it gives him a weapon with id 25 and 50 ammo.
    else if (gVar_Rank[killerid] == 20) { GivePlayerWeapon(killerid, 25, 50 } //if killer's rank is '20', it gives him a weapon with id 25 and 50 ammo again.
    return 1;
}
Cheers man
Reply
#7

Quote:
Originally Posted by iPLEOMAX
View Post
Read everything with it's meaning.
pawn Code:
new gVar_Rank[MAX_PLAYERS]; //This is the variable where all the player's rank is stored.

public OnPlayerDeath(playerid, killerid, reason) //What all things happen when a player dies?
{
    gVar_Rank[killerid]++; //The Rank of killer goes up++
    gVar_Rank[playerid]--;  //The Rank of the person died gets low--
     
    if(gVar_Rank[killerid] < 10) { GivePlayerWeapon(killerid, 22, 50 } //if killer's rank is less than 10, give him a weapon  with id 22 and 50 ammo.
    else if (gVar_Rank[killerid] == 10) { GivePlayerWeapon(killerid, 25, 50 } //if killer's rank is '10', it gives him a weapon with id 25 and 50 ammo.
    else if (gVar_Rank[killerid] == 20) { GivePlayerWeapon(killerid, 25, 50 } //if killer's rank is '20', it gives him a weapon with id 25 and 50 ammo again.
    return 1;
}
iPLEOMAX, you've posted right after i explained -_-

:P
Reply
#8

G:\Games\Rockstar Games\GTA San Andreas (normal)\gta samp server\gamemodes\Kill rank system.pwn(6) : fatal error 100: cannot read from file: "gvar"

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


1 Error.
Reply
#9

Show us how you pasted it. (Post the whole .pwn file)

@Kush
Reply
#10

ite dont laugh plz im realy shit at this stuff xD


Code:
// This is a comment
// uncomment the line below if you want to write a filterscript
//#define FILTERSCRIPT

#include <a_samp>
#include <gvar>
#if defined FILTERSCRIPT

public OnFilterScriptInit()
{
	print("\n--------------------------------------");
	print(" Blank Filterscript by your name here");
	print("--------------------------------------\n");
	return 1;
}

public OnFilterScriptExit()
{
	return 1;
}

#else

main()
{
	print("\n----------------------------------");
	print(" Blank Gamemode by your name here");
	print("----------------------------------\n");
}

#endif

new gVar_Rank[MAX_PLAYERS]; //This is the variable where all the player's rank is stored.

public OnPlayerDeath(playerid, killerid, reason) //What all things happen when a player dies?
{
    gVar_Rank[killerid]++; //The Rank of killer goes up++
    gVar_Rank[playerid]--;  //The Rank of the person died gets low--

    if(gVar_Rank[killerid] < 10) { GivePlayerWeapon(killerid, 22, 50 } //if killer's rank is less than 10, give him a weapon  with id 22 and 50 ammo.
    else if (gVar_Rank[killerid] == 10) { GivePlayerWeapon(killerid, 25, 50 } //if killer's rank is '10', it gives him a weapon with id 25 and 50 ammo.
    else if (gVar_Rank[killerid] == 20) { GivePlayerWeapon(killerid, 25, 50 } //if killer's rank is '20', it gives him a weapon with id 25 and 50 ammo again.
    return 1;
}
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)