2 Questions about scripting
#1

Hello
I am back and I have 2 questions about Scripting,so instead of openin 2 topics,I will open 1 topic with both of the questions.
Please answer me.

1.I've seen a video,and I noticed something:


[*******]PizzFU_pSJs[/*******]

(Look at the player in 0:22)

How can I do the same (that the player will have a shield on him)?

2.I want that all the players will spawn by their ID,for example: ID 1 - Spawn no. 1,ID 2 - Spawn no. 2 etc.. (untill 4
How can I do that?


Thanks for helpers
Reply
#2

Answer 1: we don't see the video.. you just putted the name of the movie/uploader
but i guess you talking about AttachObjectToPlayer() Click Here for more info about it
Answer 2: this is should work
pawn Код:
//TOP
new Float:sBi[MAX_PLAYERS][3]={ // sBi= SpawnByID
{x,y,z},//= id 0 replace the x y z with coordinates the downthere
{x,y,z},//= id 1
// more ^
{x,y,z} //= the last id you want, the last one whithout ","
};
public OnPlayerSpawn(playerid)
{
    SetPlayerPos(playerid,sBi[playerid][0],sBi[playerid][1],sBi[playerid][2]);
   //meybe you want to set interior and VW too i don't know suit your self
}
Reply
#3

Here is the link:
[ame]http://www.youtube.com/watch?v=PizzFU_pSJs[/ame]
I don't know how to put ******* videos in this forum

Edit: O.o
Reply
#4

look at my answer 1 again...
he uses AttachObjectToPlayer()
Reply
#5

Quote:
Originally Posted by XePloiT
Посмотреть сообщение
look at my answer 1 again...
he uses AttachObjectToPlayer()
But the object itself is waaaaaay smaller than what it is shown in the video (as far as I know)
Are you sure it is AttachObjectToPlayer?

Btw - מדבר עברית?
Reply
#6

actually the object is not smaller... i don't know why you thought its smaller...
and yes i'm sure its AttachObjectToPlayer

וכן... אבל מותר לדבר בפורום רק באנגלית מה שהבנתי :S
Reply
#7

Okay Toda Raba!
(וכן אני יודע לצערי)

Lock please
Reply
#8

Wait,I have a few errors:
pawn Код:
C:\Documents and Settings\Liat.LIAT-5FBA01523F\Desktop\pawno\TAF's Mode\Minigames Israel\W.W.E.pwn(22) : error 020: invalid symbol name ""
C:\Documents and Settings\Liat.LIAT-5FBA01523F\Desktop\pawno\TAF'
s Mode\Minigames Israel\W.W.E.pwn(99) : error 017: undefined symbol "Spawn"
C:\Documents and Settings\Liat.LIAT-5FBA01523F\Desktop\pawno\TAF's Mode\Minigames Israel\W.W.E.pwn(99) : warning 215: expression has no effect
C:\Documents and Settings\Liat.LIAT-5FBA01523F\Desktop\pawno\TAF'
s Mode\Minigames Israel\W.W.E.pwn(99) : error 001: expected token: ";", but found "]"
C:\Documents and Settings\Liat.LIAT-5FBA01523F\Desktop\pawno\TAF's Mode\Minigames Israel\W.W.E.pwn(99) : error 029: invalid expression, assumed zero
C:\Documents and Settings\Liat.LIAT-5FBA01523F\Desktop\pawno\TAF'
s Mode\Minigames Israel\W.W.E.pwn(99) : fatal error 107: too many error messages on one line

Compilation aborted.Pawn compiler 3.2.3664          Copyright (c) 1997-2006, ITB CompuPhase
5 Errors.

22:
pawn Код:
{x,y,z}, //ID 1
99:
pawn Код:
SetPlayerPos(playerid,Spawn[playerid][0],Spawn[playerid][1],Spawn[playerid][2]);
Reply
#9

you putted the "Spawn" at the top of the script after the includes?
and you suppose to change the x,y,z to coordinates you want...
EDIT:
i think maybe you forgot this: (the
pawn Код:
new Float:sBi[MAX_PLAYERS][3]={
{x,y,z},
{x,y,z},
// more ^
{x,y,z}
}; //<----- the ;
Reply
#10

I fixed it already,thanks anyway
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)