Point per kill.
#1

I need a simple script that gives a player a point after every kill they get.
Reply
#2

pawn Код:
public OnPlayerDeath(playerid, killerid, reason)
{
  SetPlayerScore(killerid, GetPlayerScore(killerid) + 1);
  return 1;
}
Wasn't that easy?
Reply
#3

Quote:
Originally Posted by [HiC
TheKiller ]
pawn Код:
public OnPlayerDeath(playerid, killerid, reason)
{
  SetPlayerScore(killerid, GetPlayerScore(killerid) + 1);
  return 1;
}
Wasn't that easy?
Yes, but I am a noob scripter. Thanks, anyway, it works.
Reply
#4

You seem to know what you're doing could you show me how to get text over the skin when in the character selection screen?
pawn Код:
AddPlayerClass(283,1709.1407,745.4641,12.6843,103.9314,27,50,31,150,35,10); // ARMY/COPS
    AddPlayerClass(281,1709.1407,745.4641,12.6843,103.9314,27,50,31,150,35,10); // ARMY/COPS
    AddPlayerClass(288,1709.1407,745.4641,12.6843,103.9314,27,50,31,150,35,10); // ARMY/COPS
    AddPlayerClass(282,1709.1407,745.4641,12.6843,103.9314,27,50,31,150,35,10); // ARMY/COPS
    AddPlayerClass(285,1709.1407,745.4641,12.6843,103.9314,27,50,31,150,35,10); // ARMY/COPS
    AddPlayerClass(280,1709.1407,745.4641,12.6843,103.9314,27,50,31,150,35,10); // ARMY/COPS
    AddPlayerClass(284,1709.1407,745.4641,12.6843,103.9314,27,50,31,150,35,10); // ARMY/COPS
    AddPlayerClass(286,1709.1407,745.4641,12.6843,103.9314,27,50,31,150,35,10); // ARMY/COPS
    AddPlayerClass(287,1709.1407,745.4641,12.6843,103.9314,27,50,31,150,35,10); // ARMY/COPS
Over their heads I want it to say "Containment Crew". If you know how to.
Reply
#5

ik how to get the text below-right side but idk how to get it above.
Reply
#6

Well anywhere, just somewhere where it says "Containment Crew".
Reply
#7

Because I don't know if they are all your classes, I'll do it like this:

pawn Код:
public OnPlayerRequestClass(playerid, classid)
{
  new s = GetPlayerSkin(playerid);
  if(s == 283 || s == 281 || s == 288 || s == 285 || s == 280 || s == 284 || s == 286 || s == 287)
  {
    GameTextForPlayer(playerid, "~g~Containment Crew", 2000, 3);
  }
  return 1;
}

Reply
#8

Quote:
Originally Posted by [HiC
TheKiller ]
Because I don't know if they are all your classes, I'll do it like this:

pawn Код:
public OnPlayerRequestClass(playerid, classid)
{
  new s = GetPlayerSkin(playerid);
  if(s == 283 || s == 81 || s == 288 || s == 285 || s == 280 || s == 284 || s == 286 || s == 287)
  {
    GameTextForPlayer(playerid, "~g~Containment Crew", 2000, 3);
  }
  return 1;
}

Missed one..

pawn Код:
public OnPlayerRequestClass(playerid, classid)
{
  new s = GetPlayerSkin(playerid);
  if(s == 283 || s == 281 || s == 288 || s == 285 || s == 280 || s == 284 || s == 286 || s == 287)
  {
    GameTextForPlayer(playerid, "~g~Containment Crew", 2000, 3);
  }
  return 1;
}
Reply
#9

does that put the game text above player's head?
Reply
#10

Quote:
Originally Posted by Kar
does that put the game text above player's head?
No, it shows text on the screen on OnPlayerRequestClass. You are looking for https://sampwiki.blast.hk/wiki/CreatePlayer3DTextLabel
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)