• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!

Solved Script that dont allow player equip ring if haven't X storage

1268995

Member
Joined
Sep 9, 2010
Messages
422
Reaction score
13
Hello guys, i maded a script that do not give extra exp for player that do not have storage 12345

Code:
  if getPlayerStorageValue(cid, 12345) < 1 then
    doPlayerSendTextMessage(cid, 22, "U cant use this ring!")
   return true
end

But player still can equip the ring... how can i solve that?
I need that player CANT equip the ring!!
 
Hello guys, i maded a script that do not give extra exp for player that do not have storage 12345

Code:
  if getPlayerStorageValue(cid, 12345) < 1 then
    doPlayerSendTextMessage(cid, 22, "U cant use this ring!")
   return true
end

But player still can equip the ring... how can i solve that?
I need that player CANT equip the ring!!
use that in the onMove event, but return false, maybe
 
using return, return control back to the command/script that executed it.
The movement command, sends player the message then returns false the movement, instead of return true (allowing the movement of the object.)

(I explain shittily, but that's the jist of it.)
 
using return, return control back to the command/script that executed it.
The movement command, sends player the message then returns false the movement, instead of return true (allowing the movement of the object.)

(I explain shittily, but that's the jist of it.)

I'm a really confused with ur explanation :p
 
I'm a really confused with ur explanation :p
Look at the most basic part of the script.
Let's use onStepIn.
If you return true it allows the player to walk on the tile.
If you use return false it doesn't allow the player to walk on the tile.
Code:
function onStepIn(cid, item, position, fromPosition)
   return true
end
Code:
function onStepIn(cid, item, position, fromPosition)
   return false
end
If you add in a text message to the player it doesn't affect the overall script, your just sending the player a message as well as allowing or disallowing the movement onto the tile.

Read more Here. :p
 
Look at the most basic part of the script.
Let's use onStepIn.
If you return true it allows the player to walk on the tile.
If you use return false it doesn't allow the player to walk on the tile.
Code:
function onStepIn(cid, item, position, fromPosition)
   return true
end
Code:
function onStepIn(cid, item, position, fromPosition)
   return false
end
If you add in a text message to the player it doesn't affect the overall script, your just sending the player a message as well as allowing or disallowing the movement onto the tile.

Read more Here. :p
tyyyyy
 
Back
Top