View Single Post
  #2  
Old 03-01-2004, 05:36 AM
Blue_Dragn Blue_Dragn is offline
Registered User
Join Date: Jul 2003
Posts: 302
Blue_Dragn is on a distinguished road
Re: Summon Script in a level npc stupid problem

Quote:
Originally posted by Gman4pwnu
I was making a level summon script, it works, but it summon the player to 0 x and 0 y in the level =\
help.

NPC Code:

if (actionplayertouch){
with (getplayer(#p(0))){
setcharprop #c,#p(0);
this.xx=strtofloat(#p(1));
this.yy=strtofloat(#p(2));
setplayerprop #c,Being Summoned;
setlevel2 #p(3),this.xx,this.yy;
}
}

//#CLIENTSIDE

if (playerchats&&strcontains(#c,/summon)){
tokenize #c;
setplayerprop #c,#v(playerx),#v(playery),#L;
triggeraction x+.5,y+.5,playertouch,#t(1),playerx,playery,#L;
}

if im thinking right playerx and playery are already defined and dont need strtofloat?

else try just defining strtofloat and the params in the setlevel, rather then setting another variable.

Tired right now, hope it helps
__________________
No longer a Advertisement Goat
Reply With Quote