SA-MP Forums

Go Back   SA-MP Forums > Non-English > Languages > Português/Portuguese

Reply
 
Thread Tools Display Modes
Old 20/09/2019, 08:17 PM   #1
smith
Big Clucker
 
smith's Avatar
 
Join Date: Aug 2019
Location: São Paulo
Posts: 86
Reputation: 1
Default inputtext

galera como fasso pra pegar o valor digitado na input e adicionar em Money ou ao contrario tirar de money
tentei isso mais n deu
pawn Code:
if(dialogid == SACAR){
    if(response){
    if(strlen(inputtext) < 1 || strlen(inputtext) > 20 || !strlen(inputtext))
    {
    org[pid][pCofre] --;
    GivePlayerMoney(pid, ++;
    }
   
    return true;
    }
vi alguns tuto mais nenhum fala de dinheiro maioria dos tuto de dialog e de sistema de login
__________________
Não vivo para agradar ninguém, pois quando for fazer as minhas escolhas terei de as enfrentar sozinho.
smith is offline   Reply With Quote
Old 20/09/2019, 08:30 PM   #2
oRaphael
Huge Clucker
 
oRaphael's Avatar
 
Join Date: Jul 2019
Location: Goiânia, Goias.
Posts: 198
Reputation: 2
Default Re: inputtext

Usando:

PHP Code:
strval(inputtext
__________________
Fundador, Hyze RPG.
oRaphael is offline   Reply With Quote
Old 20/09/2019, 08:37 PM   #3
SpikeCompiler
Huge Clucker
 
SpikeCompiler's Avatar
 
Join Date: Dec 2017
Location: Brazil
Posts: 323
Reputation: 20
Default Re: inputtext

PHP Code:
GivePlayerMoney(playeridstrval(inputtext)); 
Se no seu GM ''pid'' representa playerid, altere. Altere também strlen para strval.
SpikeCompiler is offline   Reply With Quote
Old 20/09/2019, 08:39 PM   #4
smith
Big Clucker
 
smith's Avatar
 
Join Date: Aug 2019
Location: São Paulo
Posts: 86
Reputation: 1
Default Re: inputtext

Quote:
Originally Posted by oRaphael View Post
Usando:

PHP Code:
strval(inputtext
tipo
Code:
 GivePlayerMoney (pid, strval(inputtext) );
?


Quote:
Originally Posted by SpikeCompiler View Post
PHP Code:
GivePlayerMoney(playeridstrval(inputtext)); 
Se no seu GM ''pid'' representa playerid, altere. Altere também strlen para strval.
vlw
__________________
Não vivo para agradar ninguém, pois quando for fazer as minhas escolhas terei de as enfrentar sozinho.
smith is offline   Reply With Quote
Old 20/09/2019, 10:02 PM   #5
RodrigoMSR
High-roller
 
RodrigoMSR's Avatar
 
Join Date: Mar 2015
Location: Brazil
Posts: 1,058
Reputation: 140
Default Re: inputtext

PHP Code:
new val strval(inputtext);

if(
val 0)
{
    
//tirar dinheiro
    
org[pid][pCofre] -= val;
    
GivePlayerMoney(pid, -val);

    
//dar dinheiro
    
org[pid][pCofre] += val;
    
GivePlayerMoney(pidval);

__________________
sttserver.net

RodrigoMSR is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
About inputtext Metroplex Scripting Help 4 04/11/2014 12:26 PM
inputtext or something... finelaq Scripting Help 5 19/10/2014 11:26 AM
How to put Inputtext Team_PRO Scripting Help 1 28/09/2014 06:37 AM
Help with if inputtext is 200 Stefand Scripting Help 2 24/06/2012 02:24 PM
inputtext Typhome Help Archive 2 28/01/2011 08:51 PM


All times are GMT. The time now is 11:06 AM.


Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.