Can you help? Please
#1

How i can make payday, levels, time and /upgrade
I want to have payday and levels and upgrade like in penls mod and i want to have /time command to see what time is it.
Can you help? I really need this.
Reply
#2

Download Pen1 and/or Godfather (or any other RP script) and copy it..?

Cheers,

Klutty.
Reply
#3

Quote:
Originally Posted by Klutty
Download Pen1 and/or Godfather (or any other RP script) and copy it..?

Cheers,

Klutty.
But everytime it shows some error, can you just give me it in this format:
1.Header:
2.public payday():
3.public level() (im not sure is it named like that but...):
Reply
#4

Just a quick bit of code, Might need editing
You need to find a way to save it yourself
Replace color with a color of your choice
pawn Код:
// Top of script
new Level[MAX_PLAYERS];
new UpgradePoints[MAX_PLAYERS];
forward PayDay();

// OnGameModeInit
SetTimer("PayDay", 3600000, 1);// 1 Hour

// OnPlayerCommandText
if(strcmp(cmdtext, "/time", true) == 0)
{
  new min,sec,hr;
  new string[100];
  gettime(hr,min,sec);
  format(string, sizeof(string), "The time is %d:%d", hr,min);
  SendClientMessage(playerid, color, string);
  return 1;
}
if(strcmp(cmdtext, "/levelup", true) == 0)
{
  if(UpgradePoints[playerid] >= Level[playerid]+4)
  {
    SendClientMessage(playerid, color, "You have successfully Level'd Up");
    Level[playerid]++;
    SetPlayerScore(playerid, Level[playerid]);
    UpgradePoints[playerid] = UpgradePoints[playerid]-Level[playerid]+4;
    return 1;
  }
  else
  {    
    SendClientMessage(playerid, color, "You dont have enough Upgrade Points");
    return 1;
  }
  return 1;
}

// Anywhere in your script apart from in another function
public PayDay()
{
  for(new i; i < MAX_PLAYERS; i++)
  {
    SendClientMessage(i, color, "Its Payday");
    // Your code here, Use i for playerid
    // For your levels
    UpgradePoints[i]++;
    if(UpgradePoints[i] >= Level[i]+4)
    {
      SendClientMessage(i, color, "You are eligiable for a Level Up (( /levelup ))");
    }
  }
  return 1;
}
Reply
#5

Quote:
Originally Posted by JeNkStAX
Just a quick bit of code, Might need editing
You need to find a way to save it yourself
Replace color with a color of your choice
pawn Код:
// Top of script
new Level[MAX_PLAYERS];
new UpgradePoints[MAX_PLAYERS];
forward PayDay();

// OnGameModeInit
SetTimer("PayDay", 3600000, 1);// 1 Hour

// OnPlayerCommandText
if(strcmp(cmdtext, "/time", true) == 0)
{
  new min,sec,hr;
  new string[100];
  gettime(hr,min,sec);
  format(string, sizeof(string), "The time is %d:%d", hr,min);
  SendClientMessage(playerid, color, string);
  return 1;
}
if(strcmp(cmdtext, "/levelup", true) == 0)
{
  if(UpgradePoints[playerid] >= Level[playerid]+4)
  {
    SendClientMessage(playerid, color, "You have successfully Level'd Up");
    Level[playerid]++;
    SetPlayerScore(playerid, Level[playerid]);
    UpgradePoints[playerid] = UpgradePoints[playerid]-Level[playerid]+4;
    return 1;
  }
  else
  {    
    SendClientMessage(playerid, color, "You dont have enough Upgrade Points");
    return 1;
  }
  return 1;
}

// Anywhere in your script apart from in another function
public PayDay()
{
  for(new i; i < MAX_PLAYERS; i++)
  {
    SendClientMessage(i, color, "Its Payday");
    // Your code here, Use i for playerid
    // For your levels
    UpgradePoints[i]++;
    if(UpgradePoints[i] >= Level[i]+4)
    {
      SendClientMessage(i, color, "You are eligiable for a Level Up (( /levelup ))");
    }
  }
  return 1;
}
Tnx, and if you could give the command /level where it shows experience levels, what level i am...
And +i need some script for gangs to be able to take a gangzone, i made gangzone, its colored in the map in the game, and i just need script where it can be taken from other gang, here are cords of gangzone
BALLAS = GangZoneCreate(1600.147, -1942.413, 2060.291, -1425.259);
GROVE = GangZoneCreate(1957.614, -1883.197, 2497.617, -1551.586);
VAGOS = GangZoneCreate(2204.798, -1598.959, 2687.759, -1148.917);
Reply
#6

I will give you a /level command, But nothing else, Also, If you set thier Level in OnPlayerSpawn then thier level is thier score
pawn Код:
if(strcmp(cmdtext, "/level", true) == 0)
{
  new string[128];
  format(string, sizeof(string), "Level: %d, Upgrade Points: %d", Level[playerid], UpgradePoints[playerid]);
  SendClientMessage(playerid, color, string);
  return 1;
}
Reply
#7

Quote:
Originally Posted by JeNkStAX
I will give you a /level command, But nothing else, Also, If you set thier Level in OnPlayerSpawn then thier level is thier score
pawn Код:
if(strcmp(cmdtext, "/level", true) == 0)
{
  new string[128];
  format(string, sizeof(string), "Level: %d, Upgrade Points", Level[playerid], UpgradePoints[playerid]);
  SendClientMessage(playerid, color, string);
  return 1;
}
Ok thanks
Reply
#8

Look at the /level command again, I did somthing wrong so i fixed it
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)