18.11.2013, 13:23
(
Последний раз редактировалось iPrivate; 18.11.2013 в 14:46.
)
Heyo!
This is my first filterscript after 2 gamemode releases. In this release I though to make something special, or at least something that I've not seen before. SORRY IF THERE IS ONE KIND OF THIS ALREADY.
It's really easy and has to do with ONLY 4 commands. I tried to make them to look as RP as more but I didn't use Proxydetector in this script. I'll use it in the next version.
• Roleplay system and messages that will be sent to everyone in the server when someone votes.
• RCON ability to check the votes of each player. ONLY RCON USERS can do that.
• Fast command processing using zCMD. May further change it to Y_Ini but I ain't sure when I will.
NOTE: Change the command names to whatever you like or whoever is going to be part of the elections. I'll make a tutorial soon on how to add more voted people or functions.
Thank you.
This is my first filterscript after 2 gamemode releases. In this release I though to make something special, or at least something that I've not seen before. SORRY IF THERE IS ONE KIND OF THIS ALREADY.
It's really easy and has to do with ONLY 4 commands. I tried to make them to look as RP as more but I didn't use Proxydetector in this script. I'll use it in the next version.
Features
• Everyone can vote for someone (Only 2 persons for now)• Roleplay system and messages that will be sent to everyone in the server when someone votes.
• RCON ability to check the votes of each player. ONLY RCON USERS can do that.
• Fast command processing using zCMD. May further change it to Y_Ini but I ain't sure when I will.
Screenshots
Download
pawn Код:
#include <a_samp>
#include <zcmd>
// Defines for the elenctions.
new VotesFirstguy[MAX_PLAYERS];
new VotesSecondguy[MAX_PLAYERS];
// The script part
public OnFilterScriptInit()
{
print("\n--------------------------------------");
print("Goverment Elenctions for Roleplay server");
print("--------------------------------------\n");
return 1;
}
COMMAND:votefirstguy(playerid, params[])
{
new string[128];
new name[MAX_PLAYER_NAME+4];
GetPlayerName(playerid, name, sizeof(name));
format(string, sizeof(string), "{FF0080} %s gets a pen and starts writing something on a letter found nearby.", name);
SendClientMessageToAll(0xFFFFFFFF, string);
format(string, sizeof(string), "{FF0080} %s grabs the letter and puts it inside a box.", name);
SendClientMessageToAll(0xFFFFFFFF, string);
VotesFirstguy[playerid]++;
return 1;
}
COMMAND:votesecondguy(playerid, params[])
{
new string[128];
new name[MAX_PLAYER_NAME+4];
GetPlayerName(playerid, name, sizeof(name));
format(string, sizeof(string), "{FF0080} %s gets a pen and starts writing something on a letter found nearby.", name);
SendClientMessageToAll(0xFFFFFFFF, string);
format(string, sizeof(string), "{FF0080} %s grabs the letter and puts it inside a box.", name);
SendClientMessageToAll(0xFFFFFFFF, string);
VotesSecondguy[playerid]++;
return 1;
}
COMMAND:firstguyvotes(playerid, params[])
{
new string[128];
if(!IsPlayerAdmin(playerid)) return SendClientMessage(playerid, 0xFFFFFFFF, "You must be an admin to check the elenction votes");
format(string, sizeof(string), "{FF0080} The firstguy has %d number of votes.", VotesFirstguy[playerid]);
SendClientMessage(playerid, 0xFFFFFFFF, string);
return 1;
}
COMMAND:secondguyvotes(playerid, params[])
{
new string[128];
if(!IsPlayerAdmin(playerid)) return SendClientMessage(playerid, 0xFFFFFFFF, "You must be an admin to check the elenction votes");
format(string, sizeof(string), "{FF0080} The secondguy has %d number of votes.", VotesSecondguy[playerid]);
SendClientMessage(playerid, 0xFFFFFFFF, string);
return 1;
}
Thank you.