23.08.2014, 14:05
Its strange because the commands that Dobby posted are using the same command model as PPC.
CMD:rac(playerid, params[])
{
SendAdminText(playerid, "/rac", params);
if(APlayerData[playerid][PlayerLevel] > 1)
{
for (new i = 1; i < MAX_VEHICLES; i++)
{
if(IsVehicleOccupied(i) == 0) SetVehicleToRespawn(i);
}
}
return 1;
}
stock IsVehicleOccupied(vehicleid)
{
for(new i =0; i < MAX_PLAYERS; i++)
{
if(IsPlayerInVehicle(i, vehicleid))
{
return 1;
}
}
return 0;
}
CMD:cc(playerid, params[])
{
for(new i = 0; i < 100; i++)
{
SendClientMessageToAll(-1, "");
}
return 1;
}
pawn Code:
|
// This command give bonus to all players
COMMAND:premiu(playerid, params[])
{
// Send the command to all admins so they can see it
SendAdminText(playerid, "/premiu", params);
// Check if the player has logged in
if (APlayerData[playerid][LoggedIn] == true)
// Check if the player's admin-level is at least 1
if(APlayerData[playerid][PlayerLevel] >= 4)
{
for (new i; i < MAX_PLAYERS; i++)
if (IsPlayerConnected(i)) // Check if the player is connected
RewardPlayer(i, 10000000, 100);
{
// Send all players a message to inform them that all players have been healed
SendClientMessageToAll(0x00FF00FF, "Toti jucatorii au primit un bonus!");
}
}
// Let the server know that this was a valid command
return 1;
}
guys how to remove these cars.. all the server cars go to this place is very pissing me off is only on this gamemode is very lagy http://alfa-game.info/uploads/9404qa...9885m47t2k.png
|
guys how to remove these cars.. all the server cars go to this place is very pissing me off is only on this gamemode is very lagy http://alfa-game.info/uploads/9404qa...9885m47t2k.png
|
Even public locations are businesses in real-life.
A hospital is a business, so is a police station. Or would you like to keep a static fine for every speedcamera on the map like before? [...] |
[...]
Players would in fact be able to apply for a job if the business is active already (owned by players). They would be able to enter it, buy stuff like a pizza at a pizza-shop, or even apply for a job (send an invite request to the leader). [...] |
[...]
I've already removed both systems from the script (hospitals and gas-stations). [...] |
[...]
And I have started on finishing the ban-system. I had the system in place, but there was no ban-command yet. But there is now. It even supports both online and offline banning in the same command. /ban <playername> <hours> <reason> [...] |
I could add a system when someone joins a company, he won't be able to join a new one within 24 hours.
So if he leaves the company right after joining one, he won't be able to join another until his 24 hour waiting time has passed. This could be implemented to prevent company-hopping. [...] |
[...]
Businesses become companies, there won't be businesses left as in V1, where only 1 player owns them and generate money automatically. [...] |
[...]
Also companies won't automatically fire members out of the company, even if they didn't login for months, unless it goes bankrupt. Then it could everyone out and becomes available to be bought again by other players. [...] |
[...]
Ok, then I just keep static police stations, where players can enter them, but not buy them. And keep static fines for all speedcams, without connecting them to police stations. The fine could be edited by lvl 6 admin of course. [...] For the tax-rate, I'll just use one fixed tax-rate for everything, like 6% as default. It would be too complex to have different tax-rates for every system. |
[...]
For the vote-kick system, I'll add a small ban-time as well (max one hour), otherwise kicking a player won't keep them out for long, as they can just re-launch the game and be able to play again, waiting for another vote-kick. This bantime will be editable by an admin lvl 6, as well as the amount of votes before a player is kicked. |
I've completed the ban command.
The entire system is quite long: 174 lines of code. It's been tested and works perfectly. It also supports offline unbanning by entering a bantime of 0 hours. You only need a part of their name like: /ban power 0 This would bring up a list of all registered players which have "power" in their name. Selecting a name from the list that shows up will unban that player, because the command was given a bantime of "0" hours. Of course, if there is someone online who's name starts with "power", the ban-command will in this case fail (a proper message is displayed), because "0" hours is used to unban players. Players who are currently playing aren't banned, so there was no reason to add online unbanning, as they wouldn't been able to play if they were banned. It can ban online players for maximum 500 hours, or permanently ban them. It can also ban offline players for maximum 500 hours, permanently ban them, or unban them. I'm gonna add the reason to the database as well, as this isn't saved yet. It would be nice to know why you've been offline/online banned when you try to login again. For the vote-kick system, I'll add a small ban-time as well (max one hour), otherwise kicking a player won't keep them out for long, as they can just re-launch the game and be able to play again, waiting for another vote-kick. This bantime will be editable by an admin lvl 6, as well as the amount of votes before a player is kicked. |
So, the ban command is the first thing you do when you're working on a new gamemode? Isn't there something more important like the basic stuff? I don't know about you but I would start with the system itself and later on I would add some extras and the administration stuff. |
You could make it in a way so that if 5 players vote for kick he will be kicked and if 10 people vote for it or if he already got kicked, he will be banned for few hours based on the default settings. |
if (APlayerData[playerid][RulesRead] == false) { new Msg[2000]; format(Msg, 2000, "%s1. Always drive on the right side on the road to avoid accidents.\n", Msg); format(Msg, 2000, "%s2. chingar or disrespect to the other players, they are his companions.\n", Msg); format(Msg, 2000, "%s3. Use the default language 'English'.\n", Msg); format(Msg, 2000, "%s4. Do not use or hackers will be banned permanently.\n", Msg); format(Msg, 2000, "%s5. Not flooding the chat, can be silent for an admin.\n", Msg); format(Msg, 2000, "%s6. Not stealing cars, subject to prison if there denounces.\n", Msg); format(Msg, 2000, "%s7. Never chingue or disrespect an administrator, you will be banned.\n", Msg); ShowPlayerDialog(playerid, DialogRules, DIALOG_STYLE_MSGBOX, "Accept:", Msg, "Accept", TXT_DialogButtonCancel); }
error 076: syntax error in the expression, or invalid function call