Forum

> > CS2D > Scripts > Cookie Script
Forums overviewCS2D overview Scripts overviewLog in to reply

English Cookie Script

2 replies
To the start Previous 1 Next To the start

old Cookie Script

_Ultimate_
User Off Offline

Quote
Hey guys i need 2 commands

@takecookie ID
@givecookie ID

these commands are easy but i dont now how to make them
i just want when you tell

@takecookie 3

it telles you

NICKNAME TAKED A COOKIE FROM NICKNAME

and when you tell

@givecookie

it telles you

NICKNAME GAVED A COOKIE TOO NICKNAME

old Re: Cookie Script

EngiN33R
Moderator Off Offline

Quote
1
2
3
4
5
6
7
8
9
10
11
addhook("say","cookiez")
function cookiez(id,t)
	if (t:sub(1,11)=="@takecookie") then
		msg(player(id,"name").." took a cookie from "..player(tonumber(t:sub(12)),"name"))
		return 1
	end
	if (t:sub(1,11)=="@givecookie") then
		msg(player(id,"name").." gave a cookie to "..player(tonumber(t:sub(12)),"name"))
		return 1
	end
end
To the start Previous 1 Next To the start
Log in to reply Scripts overviewCS2D overviewForums overview