[HELP] Create a "Info" icon.
#1

I want a "Info" icon in the game, when I run into the icon, a GameTextForPlayer should pop up.

Thank You
Reply
#2

ON top of your gamemode:
pawn Code:
new info;
Put under "OnGameModeInt"

pawn Code:
info = CreatePickup(1239, 1, 2196.4102, 2411.9182, 10.8203) // Change these coords ( 1239 is already the I);
Then at "OnPlayerPickupPickup"

pawn Code:
public OnPlayerPickUpPickup(playerid, pickupid)
{{
    if(pickupid == info)
        { GameTextForPlayer(playerid, "Hello", 3000, 0); // 3000 is: 3 seconds x 1000 = 3000 cause it milli-seconds }
return 1;
    }
}
You get they styles of the GameText from: https://sampwiki.blast.hk/wiki/GameTextStyle


If any errors occur, just say.

Hope that helped you.

Reply
#3

Quote:
Originally Posted by Jeffry
ON top of your gamemode:
pawn Code:
new vipinfo;
Put under "OnGameModeInt"

pawn Code:
info = CreatePickup(1239, 1, 2196.4102, 2411.9182, 10.8203) // Change these coords ( 1239 is already the I);
Then at "OnPlayerPickupPickup"

pawn Code:
public OnPlayerPickUpPickup(playerid, pickupid)
{{
    if(pickupid == info)
        { GameTextForPlayer(playerid, "Hello", 3000, 0); // 3000 is: 3 seconds x 1000 = 3000 cause it milli-seconds }
return 1;
    }
}
You get they styles of the GameText from: https://sampwiki.blast.hk/wiki/GameTextStyle


If any errors occur, just say.

Hope that helped you.

One time you said vipinfo, in the declaration, and the other times you said just "info". No serious mistake, but errors will be there, anyway.
Reply
#4

Quote:
Originally Posted by Jeffry
ON top of your gamemode:
pawn Code:
new vipinfo;
Put under "OnGameModeInt"

pawn Code:
info = CreatePickup(1239, 1, 2196.4102, 2411.9182, 10.8203) // Change these coords ( 1239 is already the I);
Then at "OnPlayerPickupPickup"

pawn Code:
public OnPlayerPickUpPickup(playerid, pickupid)
{{
    if(pickupid == info)
        { GameTextForPlayer(playerid, "Hello", 3000, 0); // 3000 is: 3 seconds x 1000 = 3000 cause it milli-seconds }
return 1;
    }
}
You get they styles of the GameText from: https://sampwiki.blast.hk/wiki/GameTextStyle


If any errors occur, just say.

Hope that helped you.

Alright, thank you
Reply
#5

IMPORTANT: Like DeathOnAStick said:

Make on the TOP (first point)


to:

pawn Code:
new info;

This was my fault, sorry. Hope it works fine. Greetz. And thx to DeathOnAStick
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)