quick strings? and the error
#1

pawn Код:
text[ strfind( text, "$ply" ) ] = Playername(GetClosestPlayer(playerid));
shouldn't this work?

pawn Код:
error 006: must be assigned to an array
if i'm wrong, can you show me how to do it.
Reply
#2

Show the whole command/function.
Reply
#3

that is it, i want when you say "$ply" under onplayertext, it will format "$ply" to the closest players name. and id etc.
Reply
#4

new Text[10]; ? Not sure if Text is indexed'
Reply
#5

Strings aren't declared by '$,' this isn't PHP or PERL or any other languages that retain a similar syntax.

From what I understand, you have already formatted a string called 'ply' - am I right so far? Be more specific.
Reply
#6

That's what i was wondering calg00ne, as i stated above, im not sure if Text, Or anything is indexed.
Reply
#7

i said under onplayertext

lemme try to explain better

Donya Types: "Hello $ply"

Output - Donya Says: "Hello Calg00ne"

(i will see myself type Hello $ply, but, it will send Hello Calg00ne to everyone else.)

because Calg00ne is the closest player to me, it formats $ply to The closest player to me.
the text parameter i posted above is being used in OnPlayerText(playerid, text[]);
Sorry if i used your name Calg00ne, i just needed an example

so basically, im trying to find all "$ply"'s in a text, and format them all to the closest player. I hope i explained fairly well now.
Reply
#8

bump
Reply
#9

bump2
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)