ID:1909333
 
(See the best response by DaGilbert.)
Code:
mob
icon = 'Icons.dmi'

var/canSpam = TRUE

verb/Rajada()
set category = "Combate"
if(!canSpam) return
new/obj/Rajada/head(get_step(src,dir),src,dir)
canSpam = TRUE


obj
var/Owner
Rajada
icon = 'Etc.dmi'
density = 1
New(loc,o,d)
..()
Owner = o
dir = d
spawn(20)
for(var/obj/Rajada/B)
if(B.Owner == Owner)
del B
head
icon_state = "head"
New()
..()
walk(src,src.dir)
Move() //Every time the head of the Rajad moves...
..()
var/turf/T1 = get_step(src,src.dir) //check if there's a turf in front of the head of the beam.
if(!T1) //If the turf does not exists...
for(var/obj/Rajada/B) //find all beams...
if(B.Owner == Owner) //that belong to the owner...
del B //and delete them.
var/turf/T2 = get_step(src,turn(src.dir,180)) //check the turf behind the head of the beam...
if(T2) new/obj/Rajada/tail(T2,Owner,dir) //and if it exists, create a tail obj of the beam there.
tail
icon_state = "tail"


Problem description: How can I make a player not recieve this when spawn!I mean, only when talk to npc, btw NPC ITS READY!

Best response
I'm guessing that you mean the verb?

There are a couple ways of doing this, but the easiest would be just to turn it into a proc then add it as a verb when you need to.

just change
verb/rajada()

into
proc/rajada()

then when you need it to be a verb again.

mob/proc

AddCommands()
if([Insert conditions])
src.verbs += /mob/proc/rajada
else
return


Completely new to DM code but I hope this helps!