PDA

View Full Version : [FilterScript] [FS] Cell Phone Script -- V5.0 Out Now!


[nl]daplayer
05/02/2008, 05:48 PM
[anchor=top]Cellphone Script

It's a filterscript that enable's you to use a cellphone.
This is my third filterscript i ever created.
So it can have some little bugs (test results came out fine)

Content:

Commands
Infomation
Download
Edits
Saving
Change Log
Other Things


[anchor=commands]Commands
_________________________________________________
All Versions
/SMS <number> <text>
With this command you can send a text message to the given number.
[b]/pb, /phonebook
You get a list of phone numbers of all players.
/mpn, /myphonenumber
Shows your current telephone number
/ph, /phonehelp
See a list of all the commands in this filterscript
/pc, /phonecredits
See the credits of this filterscript Please don't remove
0.4 or Higher
/call <number>
Call a specified number
/pickup
Pickup the phone
/hangup
Hangup the phone

[anchor=info]Information
_________________________________________________

If the player connect then he gets a random phone number between 1000 and the 10000
If the player sends a message then all other players get "name: text (number)"
Name The name of the player
Text The text the player send
Number The phone number of the player

If the player sends a privmsg the target gets the message "*** pm from sendername : text (number)"
Sendername The name of the sender
Text The text that the player has typed in after /pm
Number The phone number of the sender



[anchor=download]Download
V 6.0 pastebin (http://nozer0.pastebin.com/f659f5601)
V 5.0 pastebin (http://nozer0.pastebin.com/f8ffb26d)
V 4.0 pastebin (http://nozer0.pastebin.com/f3d914930)
V 3.0 pastebin (http://nozer0.pastebin.com/f2bdcc31)
V 2.0 pastebin (http://nozer0.pastebin.com/f623a0903)
V 1.0 pastebin (http://nozer0.pastebin.com/f6627fc20)

[anchor=edits]Edits
_________________________________________________
Only V5.0:
You can disable Save support by setting #define Save to 0.
All Versions:
You can change the cost of a SMS, change #define txtcost 1 to #define txtcost [price], and change price with your price

[anchor=saving]Saving
_________________________________________________
If Saving is enabled, it's saves your number to a file named "playername.txt" where name is the playername.

[anchor=log]Change log
_________________________________________________
V6.0
Changed the text color when you chat, it's now the default sa-mp color.
Fixed bugs reported by Rizard (http://forum.sa-mp.com/index.php?action=profile;u=37584):
- /pickup does not have an animation
- SMS Showing the recievers name at the reciever.
Changed /phonehelp and /pc to show the new commands too (/pickup, /call, /hangup)
V5.0:
Fixed bugs reported by Rizard (http://forum.sa-mp.com/index.php?action=profile;u=37584):
- Phone book showing 1 player,
- Bug in /phonebook and in /pb showing invalid number
Added save support
Changed Number Check, It's now checks on connect, not in a callback anymore
V4.0:
/call, /pickup and /hangup added
V3.0:
Animations added
V2.0:
Check added so nobody can have the same phone number
Some unused callbacks deleted
V1.0:
First public release

[anchor=other]Other Things
_________________________________________________

Please dont delete credits
Please report bugs
I'm dutch so English is not my first language


[b]Back to the top

Numhaken
05/02/2008, 05:49 PM
AWSOME! I was looking for one of these, would you like a mirror :mrgreen:

0xyG3N
05/02/2008, 05:49 PM
Wow this one is really nice

[nl]daplayer
05/02/2008, 05:56 PM
AWSOME! I was looking for one of these, would you like a mirror :mrgreen:

sure

Numhaken
05/02/2008, 05:58 PM
Mirror -

http://www.crazyhost.info/download.php?file=589Cellphone.rar

[nl]daplayer
05/02/2008, 06:17 PM
nice script but this looks like pen1 or godfather :D


i made this by myself

Antironix
05/02/2008, 06:18 PM
By reading it i've already found a bug.

Looked into the code right now and it confirmed it.

Try to loop trough all numbers of the connect player, otherwhise you could have the same number.

[nl]daplayer
05/02/2008, 06:27 PM
By reading it i've already found a bug.

Looked into the code right now and it confirmed it.

Try to loop trough all numbers of the connect player, otherwhise you could have the same number.




look first post

eldiablo1337
06/02/2008, 04:35 AM
By reading it i've already found a bug.

Looked into the code right now and it confirmed it.

Try to loop trough all numbers of the connect player, otherwhise you could have the same number.


Right said, but wont be such helpful, as maybe it might get a number of a player who is
DISCONNECTED, which we dont want to happen, thats why I suggest using saving system,

dini, simple file functions.

Save the numbers being used already, then loop through them all
To check if the new number coming from the random statement, is matches,
if it does, return false. else return true.


EDIT:

On second thought, you better fix this script,
It might have a lot of bugs, while getting the own number,
NO ARRAYS of playerid? how you know it will get yours?
OnPlayerText returns false unless you talk, which causes bug all over the game,
When sending a message, your failure one is after the loop, which will be sent if the message success anyway..
So it should be after player's connect, but without any return so it wont cause the loop for stoping.

Homerman
06/02/2008, 07:04 AM
Lol.... SetupPlayerForClassSelection in FS? Why? This is cell phone FS no GM-FS :D

[nl]daplayer
06/02/2008, 11:49 AM
By reading it i've already found a bug.

Looked into the code right now and it confirmed it.

Try to loop trough all numbers of the connect player, otherwhise you could have the same number.




*** fixed in V 2.0


Lol.... SetupPlayerForClassSelection in FS? Why? This is cell phone FS no GM-FS :D


*** fixed in V 2.0

watkijkje
06/02/2008, 12:06 PM
Hehehe that's fun on an RealLife server! :P

[LDT]LuxurY
06/02/2008, 12:50 PM
nice! :P

[nl]daplayer
06/02/2008, 01:29 PM
LuxurY ]
nice! :P


thanks

P1nd3r
06/02/2008, 03:39 PM
Well done. ;)

gatovas
24/06/2008, 09:39 AM
I got errors:

C:\DOCUME~1\xp\Desktop\CELL\CELL\ENGLISH\CELL.pwn( 223) : error 017: undefined symbol "SPECIAL_ACTION_STOPUSECELLPHONE"
C:\DOCUME~1\xp\Desktop\CELL\CELL\ENGLISH\CELL.pwn( 229) : error 017: undefined symbol "SPECIAL_ACTION_USECELLPHONE"
Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase


2 Errors.

Zh3r0
24/06/2008, 11:53 AM
Freakin awesome FS dude, ;) useful

Sk8erBoi
24/06/2008, 02:38 PM
WoW nice fs
tnx man

Gamer007
24/06/2008, 02:39 PM
I got errors:

C:\DOCUME~1\xp\Desktop\CELL\CELL\ENGLISH\CELL.pwn( 223) : error 017: undefined symbol "SPECIAL_ACTION_STOPUSECELLPHONE"
C:\DOCUME~1\xp\Desktop\CELL\CELL\ENGLISH\CELL.pwn( 229) : error 017: undefined symbol "SPECIAL_ACTION_USECELLPHONE"
Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase


2 Errors.



i got the same errors

Sandra18[NL]
24/06/2008, 05:06 PM
Very nice :D

I recommend you to set the phone number of a player when he/she disconnects back to '0'
So:


public OnPlayerDisconnect(playerid, reason)
{
number[playerid] = 0;
return 1;
}


If you don't do that, the phonebook will show also the phone-numbers of disconnected players ;)

MirrorMe
25/06/2008, 12:16 AM
Mirror:

http://www.fileden.com/files/2008/6/22/1971370/sfs.rar

Noi$ekick
25/06/2008, 08:39 AM
watkijkje ]
Hehehe that's fun on an RealLife server! :P

In RL servers (GF or PENo.1) it s already in the GM.

Bogdan Cirstea
25/06/2008, 02:50 PM
really nice man. good job

CJoao
25/06/2008, 10:19 PM
Go_oD

Im go to Press Download! :D ;)

zombie13333
06/07/2008, 04:11 AM
This does save the info on a .txt file right? (Playername.txt)?

cedryk_cedryk
20/07/2008, 11:11 AM
this is nice .. but i want to make one..or i think is already on forum..simple phone system..just do /call playerid ..

joh999
01/04/2009, 02:44 PM
watkijkje ]
Hehehe that's fun on an RealLife server! :P

In RL servers (GF or PENo.1) it s already in the GM.

Yes but not evrey one want to use PEN GF edit's

[LF]Mr.Lucci
01/04/2009, 06:17 PM
kind of ironic theres no /call command in your "phone" script :D nice work though, i hope you add that command in your next version ;)

Oxside
02/04/2009, 06:10 AM
Does it save the calls in a file?

[nl]daplayer
04/05/2009, 05:00 PM
NEW VERSION IS OUT 4.0

Changes:

/call added
/pickup and /hangup added


Further information look first post.

[nl]daplayer
06/05/2009, 04:22 PM
NEW VERSION IS OUT 5.0

Changes:

Fixed some minor bugs
Added save support


Further information look fist post.

P.S. Srry for double post

@TheShadow@
06/05/2009, 07:24 PM
useful for RL servers, but i hate RL Servers xDD

btw: nice script

[nl]daplayer
06/05/2009, 07:31 PM
useful for RL servers, but i hate RL Servers xDD

btw: nice script

lol

|CrippinBloodDrippin|
06/05/2009, 08:39 PM
so it saves number nao?

[nl]daplayer
06/05/2009, 08:56 PM
so it saves number nao?

yes, in playername.txt where playername is the name of the player

NeRoSiS
07/05/2009, 05:07 PM
Although I won't be using this personally, I have to say, well done on this.

You have clearly put a lot of effort into something lot's of people will use to either help them script or help get their servers going.

[nl]daplayer
07/05/2009, 05:08 PM
Although I won't be using this personally, I have to say, well done on this.

You have clearly put a lot of effort into something lot's of people will use to either help them script or help get their servers going.

thx, this was the second script i ever created :P

Jakku
09/05/2009, 06:00 AM
Number after player name is really bad, someone wanna keep his number private

javi1995iv
09/05/2009, 08:07 AM
Very good

[nl]daplayer
09/05/2009, 10:48 AM
Number after player name is really bad, someone wanna keep his number private

Shall i add, /buyprivatenumber ? :P

westre
09/05/2009, 11:17 AM
Good script, but you should fix this little bug because when 2 or more peoples are calling to the same person, it gets a bit buggy

[nl]daplayer
09/05/2009, 12:32 PM
Good script, but you should fix this little bug because when 2 or more peoples are calling to the same person, it gets a bit buggy

thx for the report, it will be fixed in the next version

Nmancer
10/05/2009, 05:14 PM
My phone number always 0

[nl]daplayer
10/05/2009, 05:36 PM
My phone number always 0

If you load it with /rcon loadfs, or in console loadfs then you need to gmx before it works.

Nmancer
11/05/2009, 03:51 PM
My phone number always 0

If you load it with /rcon loadfs, or in console loadfs then you need to gmx before it works.

i tried it but my phone number still 0

[nl]daplayer
11/05/2009, 04:13 PM
My phone number always 0

If you load it with /rcon loadfs, or in console loadfs then you need to gmx before it works.

i tried it but my phone number still 0

i don't have this problem, maybe redownload?, does that help?, Did you copy everything from the pastebin? Do you still have problems?

[nl]daplayer
11/05/2009, 05:02 PM
UPDATE 6.0 Out now

Updates:

Changed the text color when you chat, it's now the default sa-mp color.
Fixed bugs reported by Rizard (http://forum.sa-mp.com/index.php?action=profile;u=37584):

/pickup does not have an animation
SMS Showing the recievers name at the reciever.

Changed /phonehelp and /pc to show the new commands too (/pickup, /call, /hangup)


Further information, look first post

Jakku
13/06/2009, 05:07 PM
Much bugs

Chaprnks
15/06/2009, 03:03 PM
'/sms' and '/call' look very similar to the godfather.

[nl]daplayer
15/06/2009, 09:01 PM
Much bugs

what kind of bugs?

Doman
21/07/2009, 08:44 AM
Um i guess im bumping an old thread but i got a question, how to remove the number that goes after player name in chat(when hes not using his cell) ive looked all voer the code and cant seem to find the part which does that O_o.

[nl]daplayer
22/07/2009, 10:35 PM
Um i guess im bumping an old thread but i got a question, how to remove the number that goes after player name in chat(when hes not using his cell) ive looked all voer the code and cant seem to find the part which does that O_o.

i cant look right now. but from what i can remember look at onplayertext at the else. i wil make in the next version that this could be turned off

p.s. typed on psp

Hot
03/10/2009, 08:51 PM
For example, I already have a register and login system, which uses ini, not dini, neither dudb, just ini, can I put the saving stuff on it?

capikepi
08/10/2009, 07:35 PM
450 Lines :P Not Bad ..Not bad. :) Awesome! =) :P

DarkShootah
09/10/2009, 11:41 AM
Very Useful for role-playing servers
gr8 job m8

[nl]daplayer
09/10/2009, 10:56 PM
Thanks all for your great comments :P


For example, I already have a register and login system, which uses ini, not dini, neither dudb, just ini, can I put the saving stuff on it?


You need to place this stuff in your gamemode. You need to do it yourself.

DeltaAirlines12
08/11/2009, 10:19 PM
WOW, this is nice. I removed your credits then added them into my main
/credits server command. Nice job, hope you come out with an even BETTER one! ^^

IKE
09/11/2009, 12:25 PM
Very very very good! :o

Tomejus
23/11/2009, 11:59 PM
i got problem when i complite it

C:\Documents and Settings\Tomas\Desktop\Serveris\filterscripts\tlf. pwn(132) : warning 235: public function lacks forward declaration (symbol "OnPlayerPrivmsg")
Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase


1 Warning.
: (

[nl]daplayer
25/11/2009, 03:56 PM
i got problem when i complite it

C:\Documents and Settings\Tomas\Desktop\Serveris\filterscripts\tlf. pwn(132) : warning 235: public function lacks forward declaration (symbol "OnPlayerPrivmsg")
Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase


1 Warning.
: (

remove that callback, this warning is made because this script is made for 0.2X.

chaosnz
06/12/2009, 01:45 AM
Serious problem with your script...

public OnPlayerText(playerid, text[])
{
if (!player[playerid][calling] || player[playerid][caller] == 255)
{
new string[128];
format(string, 255, "[%i] <Cell # %d> %s", playerid, player[playerid][number], text);
SendPlayerMessageToAll(playerid, string);
}
else
{
new str128];
GetPlayerName(playerid, str, 16);
format(str, sizeof(str), "(Cellphone)%s : %s", str, text);
SendClientMessage(player[playerid][caller], 0xBFC0C2FF, str);
SendClientMessage(playerid, 0xBFC0C2FF, str);
}
return 0;
}

Needs to be changed to this

public OnPlayerText(playerid, text[])
{
if (!player[playerid][calling] || player[playerid][caller] == 255)
{
new string[256];
format(string, 255, "[%i] <Cell # %d> %s", playerid, player[playerid][number], text);
SendPlayerMessageToAll(playerid, string);
}
else
{
new str[256];
GetPlayerName(playerid, str, 16);
format(str, sizeof(str), "(Cellphone)%s : %s", str, text);
SendClientMessage(player[playerid][caller], 0xBFC0C2FF, str);
SendClientMessage(playerid, 0xBFC0C2FF, str);
}
return 0;
}

As when someone exceeds 128 characters, it crashes the server,

povilaslt2
06/12/2009, 11:07 AM
Complete this for 0.3 version. I verry need this! please!

roar
06/12/2009, 11:12 AM
Wow! Really great Cell Phone System! :D

DRIFT_HUNTER
18/03/2010, 03:52 PM
sugestion:

add phone on/off
and phone batery

misho1
01/03/2011, 08:29 PM
Mirror -

http://www.crazyhost.info/download.php?file=589Cellphone.rar

can you send another link without crazyhost plz media fire or megaupload without crazyhost

austin070
02/03/2011, 02:44 AM
Nice script :D. It's nice and it taught me some :D.

Ironboy
02/03/2011, 03:46 AM
wow nice script :)

BASITJALIL
02/03/2011, 05:37 AM
Awesome script
BTW How can we get someone number?

Shiva.negi
12/08/2011, 10:59 AM
i am playing on RP server so can i change my no. with this script??

crossx7
16/08/2011, 07:27 AM
can u add the posibilit to send an sms to an offline player.
and that he can read his inbox on hit phone

eеe
14/12/2011, 02:34 PM
Good Job

Neonman
14/12/2011, 04:02 PM
lol gonna add it xD. Seems perfect for RP.

Reklez
02/04/2012, 07:52 AM
Good job gonna surely gonna use it in my RP Server

Mariooo
09/09/2012, 09:27 AM
NL: Netjes man goed werk!

English: Nice man good work!