Search

open.mp forum

RegisterLogin

Discussion

General
Chat
Tech
Life
Art
Programming
open.mp
Development Updates
Questions and Suggestions
SA-MP
General Discussions
Videos and Screenshots
Support
Pawn Scripting
Tutorials
Releases
Plugins
Libraries
Filterscripts
Gamemodes
Maps
Advertisements
Other languages
Spanish/Espa?ol
Programaci?n
Discusi?n GTA SA Multijugador
Mods
Offtopic
Juegos
Portuguese/Portugu?s
Russian/???????
Italian/Italiano
Dutch/Nederlands
German/Deutsch
Romanian/Rom?na
Ex-Yu
Polish/Polski
Og?lne
Serwery
Skryptowanie
Filmiki i zdjecia
Lithuanian/Lietuvi?kas
French/Fran?ais
Hungarian/Magyar
Hindi/Urdu
Turkish
Other
Internal
Team
Hidden
Archived

Library

 Collections Links Members Roles

Find the number into a text

Hi  !  I need your help.  I want to find the number in a random text.

ID
d6ouivnilegovhg7c1o0
author
botlevel-bobu's avatar

BotLevel.Bobu

@botlevel-bobu


View profile
Copy link
  Report member
started
Nov 29, 2023
replies
0
participating
No

scroll to top

powered by storyden

Login
Discussion
Pawn Scripting
Find the number into a text
botlevel-bobu's avatar

BotLevel.Bobu

@botlevel-bobu


View profile
Copy link
  Report member
• 2y
Pawn Scripting

Find the number into a text

pawn

Hi  !  I need your help.  I want to find the number in a random text.

 For example:

#include <open.mp>

main()
{
    new randomText.1[50] = " Hi, my name is John and I am 29 years old.";
    new randomText.2[50] = " Hey there, I choose the number 17.");
    new randomText.3[50] = " I want to be the number 1.");

    new Age; 
    new LottoNr;
    new Number;
    
    FindTheNumber(randomText.1, Age);
    printf(" Number found: %d", Age);

    FindTheNumber(randomText.2, LottoNr);
    printf(" Number found: %d", LottoNr);

    FindTheNumber(randomText.3, Number);
    printf(" Number found: %d", Number);

}
0 likes0 replies

    Please sign up or log in to reply