noob scripter need help
#1

i would like someone to teach me/show me about teleports. so basicly getting player's pos and interrior its not a problem. i can make it..
but i dont know how to make it from some special point. i mean that, if aplayer near a door or something, i want him to type /enter or press F button to get enter.. thatas all, and not /tele 10 from the other side of the map. (yea its gonna be rp server).
and maybe show me a bit about pickups. because wiki.sa-mp.com didnt help much..

thanks
Reply
#2

Why don't you use the filterscript gl_properties? Load it or look at the script. Well, if you're a noob scripter I recommend you to start with the basics like making simple commands and player classes/vehicles...
Reply
#3

i can make the vehicles and skins its not the problem... altho i still dont get how to make teams.. LOL
Reply
#4

Quote:
Originally Posted by dwd93
i can make the vehicles and skins its not the problem... altho i still dont get how to make teams.. LOL
Making Teams isn't difficult at all once you learn something about 'Variables', and uses of it.
Reply
#5

once lol i cant really understnad soemthing there... >.> variables? please lol any simple way to learn it...? beacuse i dont really understand what is that for.
Reply
#6

I'll help you.

Variables are very very useful in SAMP scripting. They help you out in making conditions like if and other important things. Here is the description in examples:
pawn Код:
new MyVariable;
Above, you created a new variable, and this variable can be anything written replacing MyVariable. Now let's make it easy, suppose the variable was:
pawn Код:
new Team[MAX_PLAYERS];
Note, that we used MAX_PLAYERS, which will set your variable's Array to your maximum players in server.cfg.
Now, we need to define our teams just for the ease. This needs to be put below the #includes and above the forwards:
pawn Код:
#define TEAM_COP 1
#define TEAM_GANG1 2
These can also be changed to whatever you want. Now as we defined our teams, let's get to the main work. Now you need to set the player's team. We'll do it in a easy command:
pawn Код:
//This message, after the two slashes '//' will be ignored by the compiler.
if (strcmp("/Police", cmdtext, true, 10) == 0)//This will be the command /police
{
   Team[playerid] = 1;//The team here has been set to TEAM_COP, as we defined TEAM_COP as '1'
   SendClientMessage(playerid, 0xFFFFFFFF,"Your now a member of San Andreas Police.");//This will send a confirmation message to the Commander.
   return 1;
}
Now, let's make our final step, and try a command which will only be used by 'Cops':
pawn Код:
if(strcmp("/Flash", cmdtext, true, 10) == 0)
{
  new string[56];//this is needed for formatting.
  new playername[24];//this is going to be used for GetPlayerName.
  if(Team[playerid] == 1)
  {
    GetPlayerName(playerid, playername, sizeof(playername));//Getting the player's name.
    format(string, sizeof(string), "%s raises his Police badge and shows it around", playername);//formating the text with the player's name.
    SendClientMessage(playerid,0xFFFFFFFF,string);//This is incomplete with out the format.
  }
  return 1;
}
Reply
#7

yea ok kind of get this part but.. lets say i want them have skins to choose? at the class selection place. i want to have cops skins and lets say mafaia skins. if its possible to make it as like, when moving over a skin, if its a cop show a text draw COP and if its mafia show text draw MAFIA, and ofcourse auto set teams.. lol
Reply
#8

Double post!!!


i found out about the teleporting. just saw the IsPlayerInRangeOfPoint command ^^
all i need now is to set skins for teams, make stats and put pickups
Reply
#9

Quote:
Originally Posted by dwd93
Double post!!!


i found out about the teleporting. just saw the IsPlayerInRangeOfPoint command ^^
all i need now is to set skins for teams, make stats and put pickups
https://sampwiki.blast.hk/
Reply
#10

Quote:
Originally Posted by Adil
Quote:
Originally Posted by dwd93
Double post!!!


i found out about the teleporting. just saw the IsPlayerInRangeOfPoint command ^^
all i need now is to set skins for teams, make stats and put pickups
https://sampwiki.blast.hk/
wiki samp fails.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)