Show Posts
|
Pages: 1 [2]
|
16
|
Scripting / Script Snippets / new wep system easy way
|
on: June 11, 2017, 10:51:23 pm
|
function onPlayerCommand( pPlayer, szCommand, szArgs ) { if ( szCommand == "cmds" ) { MessagePlayer( "Current server commands are the following", pPlayer ); MessagePlayer( "------------------wepcmds-------------------", pPlayer ); } else if ( szCommand == "wepcmds" ) { MessagePlayer( "------------Wepon Commands---------------", pPlayer ); MessagePlayer( "Syntax:-(/)use before wep name", pPlayer ); MessagePlayer( "Example:- /name of wep here", pPlayer ); MessagePlayer( "(/):- m16 colt shot gre uzi", pPlayer ); MessagePlayer( "----------------------------------------", pPlayer ); } else if ( szCommand == "m16" ) { pPlayer.SetWeapon( 6 ); } else if ( szCommand == "colt" ) { pPlayer.SetWeapon( 2 ); } else if ( szCommand == "shot" ) { pPlayer.SetWeapon( 4 ); } else if ( szCommand == "gre" ) { pPlayer.SetWeapon( 11 ); } else if ( szCommand == "uzi" ) { pPlayer.SetWeapon( 3 ); } }
Modify message
|
|
|
19
|
Scripting / Script Snippets / Re: /count
|
on: May 23, 2017, 03:06:30 pm
|
function onPlayerCommand( player, cmd, text ) { if ( cmd == "count" ) { NewTimer( Message, 1000, 1, "=3=", 200, 0, 0 ); NewTimer( Message, 2000, 1, "=2=", 200, 0, 0 ); NewTimer( Message, 3000, 1, "=1=", 200, 200, 0 ); NewTimer( Message, 4000, 1, "=GO!=", 0, 200, 0 ); } }
Just a colorful little counting script snippet. Useful for DMs.
I Have Did It Like /count not like /c count look:
else if ( szCommand == "count" ) { NewTimer( "BigMessage", 1000, 1, player ,"=3=" , 5000, 3 ); NewTimer( "BigMessage", 2000, 1, player ,"=2=" , 5000, 3 ); NewTimer( "BigMessage", 3000, 1, player ,"=1=" , 5000, 3 ); NewTimer( "BigMessage", 4000, 1, player ,"=GO!=" , 5000, 3 ); } so when i type /count nothing happens why? do i have to define a pPlayer too?
try this else if ( szCommand == "count" ) { NewTimer( "BigMessage", 1000, 1, pPlayer ,"=3=" , 5000, 3 ); NewTimer( "BigMessage", 2000, 1, pPlayer ,"=2=" , 5000, 3 ); NewTimer( "BigMessage", 3000, 1, pPlayer ,"=1=" , 5000, 3 ); NewTimer( "BigMessage", 4000, 1, pPlayer ,"=GO!=" , 5000, 3 ); }
|
|
|
|