SA-MP Forums Archive
/reply for iphone users - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: /reply for iphone users (/showthread.php?tid=664501)



/reply for iphone users - bosmania - 02.03.2019

I implemented a iphone system on my server,and i want to create a command,the /reply command for iphone users.
I want iphone users to be able to reply to their last message with this command,for example:
-SMS from Bob(1234): hi;
-SMS from Dude(2312): hi;
When an iphone user uses reply,he just has to type /reply <text> in order to reply to dude's message.(on my server a non iphone user types /sms 2312 <text> to reply to dude)
I hope you understand me


Re: /reply for iphone users - JasonRiggs - 02.03.2019

Create a new variable on the top of the gamemode..
PHP код:
new pLastMessage[playerid]; 
Then after Dude sends a message to Bob, set the value of the variable with respect to Bob to Dude's id..

for example
PHP код:
pLastMessage[i] = playerid
while "i" is Bob's ID and "playerid" is Dude's id, and when Bob does /reply command, send the SMS to the "pLastMessage" which is the ID of Dude..


Re: /reply for iphone users - bosmania - 02.03.2019

Ok but how do i script that,i don’t really know how