Vice City Multiplayer
VC:MP 0.3 => mIRC/pawn Scripting => Topic started by: mrockxkingbutt on December 06, 2012, 12:07:48 pm
-
i wanna add !website cmd in my script
when i type !website nothing happend
please help
-
I don't know you're much more dumb then I thought or if you're just too lazy to get your ass working. A !website command is one of the most easiest to do and if you don't know how, you probably should go read the tutorials or gtfo.
[pawn]
public OnPlayerText( playerid, text[] )
{
if( strcmp( text, "!website", true ) == 0 ) {
SendClientMessageToAll( 0xFFFF00, "www.blahblahblah.com" );
return 1;
}
return 0;
}[/pawn]
I'm not scripting any Pawn server atm so this script is untested.
EDIT: Next time, post this in the correct place.!!!
-
its not working inn gups :p
-
its not working inn gups :p
Are you even trying or are you just copy and pasting whatever people give you?
-
its not working inn gups :p
lol learn pawn and make you own command
>:(
-
i am new at scripting
my skills of scripting is too low
25%
please send me code
of !webiste cmd
-
i am new at scripting
my skills of scripting is too low
25%
please send me code
of !webiste cmd
FFS!! I gave you the fucking code!! Just copy it and paste it to the correct section. Is that tooo hard to understand??
-
where is the section i need to paste it where
in admin cmd line or player
-
Press CTRL+F and type there: "OnPlayerText"
You should find it.
Put this part there:
if( strcmp( text, "!website", true ) == 0 ) {
SendClientMessageToAll( 0xFFFF00, "www.blahblahblah.com" );
return 1;
}
Don't forget, you must have just one " if ( ... ( ... ) ... ) { " , the rest will be " else if ( ... ( ... ) ... ) { " .
Example:
public OnPlayerText(player, text[])
{
if( ... ( ... ) ... ) {
//your code
return 1;
}
else if ( ... ( ... ) ... ) {
//your code
return 1;
}
else if ( ... ( ... ) ... ) {
//your code
return 1;
}
return 1;
}
-
Why is this command? You better show it without a command every 60 seconds for example.
public AutoSaySite(playerid)
{
SendClientMessageToAll(COLOR_BLUE,"http://www.blablabla.com/");
return 1;
}
public OnGameModeInit()
SetTimer("AutoSaySite",60000,1);
-
thanks
vicemania
and
seeebbyy