30.08.2012, 05:07
I'm thinking its because it's so damn late, but I need some help with this.
Currently, what I have is a phone system that I'm trying to get to work.
Here are the variables:
Now, the original string is "000000000", I'm trying to insert the number they hit next in line. Like say they hit 1;
"000000000" would turn into "000000001", and if they hit 1 again (or any other number for that matter), it would turn into "000000011", and so on. How would I go about doing this?
I've attempted, but I'm figuring it's too late because I can't seem to get it working.
What am I doing wrong?
Currently, what I have is a phone system that I'm trying to get to work.
Here are the variables:
pawn Код:
new
cellDialedNumber [ MAX_PLAYERS ] [ 30 ],
cellDialStage [ MAX_PLAYERS ] = 9;
"000000000" would turn into "000000001", and if they hit 1 again (or any other number for that matter), it would turn into "000000011", and so on. How would I go about doing this?
I've attempted, but I'm figuring it's too late because I can't seem to get it working.
pawn Код:
if(clickedid == DialPadOne )
{
new s[128]; // Testing string.
strdel( cellDialedNumber [ playerid ], 9, 10 );
strins( cellDialedNumber [ playerid ], "1", cellDialStage [ playerid ] );
format(s, 128, "%s", cellDialedNumber [ playerid ] ); // Testing.
SendClientMessage( playerid, -1, s); // Testing.
SendClientMessage( playerid, -1, "One" ); // Testing.
cellDialStage [ playerid ] -= 1;
}