Advertisement
Guest User

Untitled

a guest
May 22nd, 2017
69
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.64 KB | None | 0 0
  1. function onSay( cid, words, param )
  2.     if( param == "" )then
  3.         doPlayerSendTextMessage( cid, MESSAGE_STATUS_CONSOLE_BLUE, "You need to type the parameter." )
  4.         return false
  5.     end
  6.  
  7.  
  8.     local Player = getPlayerByName(param)
  9.  
  10.     if Player == LUA_NULL then
  11.         doPlayerSendTextMessage( cid, MESSAGE_STATUS_CONSOLE_BLUE, "Player does not exist" )
  12.         return false
  13.  
  14.     end
  15.  
  16.     if isPlayer(Player) == true and isPromoted(Player) == false then
  17.         local vocId = getPlayerVocation(Player)
  18.         doPlayerSetVocation(Player,vocId + 4)
  19.  
  20.     else
  21.         doPlayerSendTextMessage( cid, MESSAGE_STATUS_CONSOLE_BLUE, "Player is already promoted" )
  22.     end
  23.  
  24.  
  25.  
  26.     return true
  27. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement