• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • ✅ The POLL for Hive's Texturing Contest #33 is OPEN! Vote for the TOP 3 SKINS! 🔗Click here to cast your vote!

[Trigger] Checking player name?

Status
Not open for further replies.
Level 2
Joined
Sep 5, 2015
Messages
10
Is there anyway to check a players name through triggers?
Example:
I create a shop that has a very overpowered item in it. But I only want a player with the name "Sakkuzi" to be able to buy it?
 
Last edited:
Level 10
Joined
Apr 4, 2010
Messages
509
  • Sakkuzi
    • Events
      • Unit - A unit Sells an item (from shop)
    • Conditions
      • (Item-type of (Sold Item)) Equal to Over Powered Item
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Name of (Owner of (Buying unit))) Equal to Sakkuzi
        • Then - Actions
          • Do nothing
        • Else - Actions
          • Item - Remove (Sold Item)
          • Player - Add Refund to (Owner of (Buying unit)) Current gold
          • Game - Display to (Player group((Owner of (Buying unit)))) the text: Sorry, only Sakkuzi can buy this item
EDIT: To check for name it's found in String Comparison
 
Last edited:
Status
Not open for further replies.
Top