Vice City Multiplayer
VC:MP 0.3 => mIRC/pawn Scripting => Topic started by: abdulfussy on January 26, 2013, 05:25:34 pm
-
how to make heal for money i wnat to heal like 300$ can u tell me how to chnage this cmd[pawn] else if ( strcmp( cmd, "!heal", true ) == 0 )
{
tmp = strtok( cmdtext, idx );
if ( !strlen( tmp ) )
{
SetPlayerHealth(playerid, 100);
SendClientMessage(playerid, BLUE,"You Are Healthy Now.");
}
else
{
new plr = FindPlayerIDFromString( tmp );
if ( plr != INACTIVE_PLAYER_ID )
{
SendClientMessage(playerid, COLOR_GREEN,"%s Is Healthy Now.",gPlayers[ plr ]);
SendClientMessage(plr, COLOR_YELLOW,"You Are Healthy Now, Thanks To %s", gPlayers[ playerid ]);
SetPlayerHealth(plr, 100);
}
else { SendClientMessage( playerid, COLOR_RED, "Error: Unknown player" ); }
}
return 1;
}[/pawn]
-
how to make heal for money i wnat to heal like 300$ can u tell me how to chnage this cmd[pawn] else if ( strcmp( cmd, "!heal", true ) == 0 )
{
tmp = strtok( cmdtext, idx );
if ( !strlen( tmp ) )
{
SetPlayerHealth(playerid, 100);
// Here you can make/use a function to decrease money to the player
SendClientMessage(playerid, BLUE,"You Are Healthy Now.");
}
else
{
new plr = FindPlayerIDFromString( tmp );
if ( plr != INACTIVE_PLAYER_ID )
{
SendClientMessage(playerid, COLOR_GREEN,"%s Is Healthy Now.",gPlayers[ plr ]);
SendClientMessage(plr, COLOR_YELLOW,"You Are Healthy Now, Thanks To %s", gPlayers[ playerid ]);
SetPlayerHealth(plr, 100);
// Here you can make/use a function to decrease money to the player
}
else { SendClientMessage( playerid, COLOR_RED, "Error: Unknown player" ); }
}
return 1;
}[/pawn]
Catched it? :D
-
thx
-
REMOVED, READ THIS:
http://forum.vicecitymultiplayer.com/index.php?topic=5517.0