Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Topics - Falcon

Pages: [1]
1
mIRC/pawn Scripting / Location Script
« on: September 30, 2007, 03:40:39 pm »
Location script using hash table instead of ini file.

Create and load hash table
Code: [Select]
!hmake -s area 2000
if ($exists(vcmp.area.txt)) { !hload area vcmp.area.txt }

Set max locations
Code: [Select]
var %a = 1
while ($hget(area,%a) != $null) {
   !inc %a
}
set %max_loc %a


Get Players Locations
Code: [Select]
alias vcmp.area {   
var %a = 1,%b = $hget(vcmp,pos.x. $+ $1),%c = $hget(vcmp,pos.y. $+ $1),%d
while (%a < %max_loc) {
    %d = $hget(area,%a)
    if ($inpoly(%b,%c, [ %d ] )) !return $hget(area,%a $+ .)
    !inc %a
}

Convert old ini to hash
Code: [Select]
alias convert {
  !hmake -s area 2000
  var %a,%b = 1,%c
  %a = AREA2
  while (%b <= $ini(vcmp.data.ini,%a,0)) {
    %c = $ini(vcmp.data.ini,%a,%b)
    !hadd area %b %c
    !hadd area %b $+ . $readini(vcmp.data.ini,%a,%c)
    !inc %b
  } 
  !hsave area vcmp.area.txt
}

Hope this is useful for some of you guys.

Falcon

2
mIRC/pawn Scripting / 0.3z rcon Commands
« on: July 22, 2007, 03:59:27 pm »
Hope this helps you scripters out there.

Full list of rcon commands.

kick <id> (explains itself)
ban <id> (explains itself)
banip <ip> (explains itself)
unban <ip> (explains itself)
password <newpassword> (sets password)
maxplayers <newmaxplayers> (sets max player limit)
gethp <id> (outputs players health to [gethp] <id> <health>)
getarmour <id> (outputs players armour to [getarmour] <id> <armour>)
getmoney <id> (outputs players money to [getmoney] <id> <money>)
getloc <id> (outputs players health to [getloc] <id> <pos.x> <pos.y> <pos.z>)
gethr (outputs current hr to [gethr] <currenthour>)
getmin (outputs current minute to [getmin] <currentminute>)
getweather (outputs current weather to [getweather] <currentweathervalve>)
getspectators (outputs current amount of people in spectator mode to [getspectators] <amount>)

adminchat <text> (Display text in server)
adminmsg <id> <text> (Sends text to id only)
sethr <newhour> (explains itself)
setmin <newminute> (explains itself)
setweather <valve> (Changes weather to new valve)
settimerate <rate> (changes rate time counts)

set 1 <id> <pos.x> <pos.y> <pos.z> <interourid> (sets players position and interour)
set 2 <carid> <health> (sets vehicle health)
set 3 <carid> <status> (sets car door status etc 4 = locked)
set 4 <id> <money> (sets players money)
set 5 <id> <weaponid> (sets players weapons .. note 0 will remove all weapons)
set 6 <id> <state> (sets players control state)
set 7 <id> (removes marker from player)
set 8 <carid> <pos.x> <pos.y> <pos.z> (sets car location)
set 9 <id> <carid> (put player into car)
set 10 <id> <health> (sets player health)
set 11 <id> <colour> (show player marker and change colour)
set 12 <id> <armour> (set players armour)
set 13 <id> <text> (display text centre .. note this uses std gxt)
set 14 <id> (set player non imune to other players)
set 15 <id> (set player imune to other players)
set 16 <marker> <pos.x> <pos.y> <pos.z> (set icon and posation)
set 18 <carid> (kils car engine)

newpickup <type> <pos.x> <pos.x> <pos.y> (creates pickup at position and outputs too [newpickup] <pickupid> <type> <pos.x> <pos.y> <pos.z>)
deletepickup <pickupid> (explains itself)
spawnpickup <pickupid> (respawns pickup)
spickupplayer <playerid> <pickupid> (spawns pickup for player only)
do <playerid> <anim> (set players animation)

players (returns this info in order - id,playername,ip,port,playerhealth,playerarmour,coord-x,coord-y,coord-y,carid,currentweapon,currentcarhp,players,currentmoney)





Pages: [1]