How to make this easier?
#1

EDIT
Nevermind i got it.

Heres the code

pawn Код:
switch (strval(params))
    {
        case 1: printf("Player has chosen: %d (Los Santos)", strval(params));
        case 2: printf("Player has chosen: %d (San Fierro)", strval(params));
        case 3: printf("Player has chosen: %d (Las Venturas)", strval(params));
    }
--------
Hi guys, im checking each number of the params. Look:

pawn Код:
if (strval(params) == 1)
    {
        printf("Player has chosen: %d (Los Santos)", strval(params));
        return 0;
    }
   
    if (strval(params) == 2)
    {
        printf("Player has chosen: %d (San Fierro)", strval(params));
        return 0;
    }

    if (strval(params) == 3)
    {
        printf("Player has chosen: %d (Las Venturas)", strval(params));
        return 0;
    }
I know this can be done simpler.

Can somebody give me an example?
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)