Vice City Multiplayer
VC:MP 0.3 => mIRC/pawn Scripting => Snippet Showroom => Topic started by: aledark24 on November 17, 2012, 06:59:19 pm
-
Traslate to english, i not have time :o :P :D
[pawn] else if(strcmp(cmdtext, "armas", true) == 0) {
SendClientMessage(playerid,COLOR_YELLOW ,"-----------Compra de armas-----------");
SendClientMessage(playerid,COLOR_YELLOW ,"Para comprar una m60 /c m60, Para comprar una ingrams /c ingrams");
SendClientMessage(playerid,COLOR_YELLOW ,"Para comprar una tec /c tec, Para comprar un francotirador /c laser");
SendClientMessage(playerid,COLOR_YELLOW ,"Para comprar chaleco antibalas /c chaleco, Para comprar una shotgun /c shotgun");
SendClientMessage(playerid,COLOR_YELLOW ,"Para comprar una m4 /c m4, Para comprar una stubby /c bb");
SendClientMessage(playerid,COLOR_YELLOW ,"Para comprar una ruger, /c ruger, Para comprar granadas, /c granadas");
SendClientMessage(playerid,COLOR_YELLOW ,"Para comprar katana, /c katana");
SendClientMessage(playerid,COLOR_YELLOW ,"---Puedes comprar en cualquier Ammunation---");
return 1;
}
else if(strcmp(cmdtext, "chaleco", true) == 0) {
if(PlayerToPoint(5, playerid,364.11175, 1059.95654, 19.19139) || PlayerToPoint(5, playerid,-63.83909, -1477.56042, 10.44908) || PlayerToPoint(5, playerid,-673.11517, 1204.90148, 11.10896)) {
new cash = GetPlayerMoney(playerid);
if(cash >= 1000) {
SendClientMessage(playerid,COLOR_YELLOW,"Compraste chaleco!");
SetPlayerArmour(playerid,99);
DecPlayerHandCash(playerid,1000);
}
if(cash < 999) {
SendClientMessage(playerid,COLOR_YELLOW,"Necesitas mas dinero!Necesitas $1000 para comprar chaleco!");
}
}
else
{
SendClientMessage(playerid,COLOR_YELLOW,"Debes estar en Ammu-Nation");
}
return 1;
}
else if(strcmp(cmdtext, "laser", true) == 0) {
if(PlayerToPoint(5, playerid,364.11175, 1059.95654, 19.19139) || PlayerToPoint(5, playerid,-63.83909, -1477.56042, 10.44908) || PlayerToPoint(5, playerid,-673.11517, 1204.90148, 11.10896)){
new cash = GetPlayerMoney(playerid);
if(cash >= 1000) {
SendClientMessage(playerid,COLOR_YELLOW,"Compraste Francotirador!");
SetPlayerWeapon(playerid,29,1000);
DecPlayerHandCash(playerid,1000);
}
if(cash < 999) {
SendClientMessage(playerid,COLOR_YELLOW,"Necesitas mas dinero!Necesitas $1000 para comprar Francotirador!");
}
}
else
{
SendClientMessage(playerid,COLOR_YELLOW,"Debes estar en Ammu-Nation");
}
return 1;
}
else if(strcmp(cmdtext, "bb", true) == 0) {
if(PlayerToPoint(5, playerid,364.11175, 1059.95654, 19.19139) || PlayerToPoint(5, playerid,-63.83909, -1477.56042, 10.44908) || PlayerToPoint(5, playerid,-673.11517, 1204.90148, 11.10896)){
new cash = GetPlayerMoney(playerid);
if(cash >= 1000) {
SendClientMessage(playerid,COLOR_YELLOW,"Compraste Stubby shotgun!");
SetPlayerWeapon(playerid,21,1000);
DecPlayerHandCash(playerid,1000);
}
if(cash < 999) {
SendClientMessage(playerid,COLOR_YELLOW,"Necesitas mas dinero!Necesitas $1000 para comprar Francotirador!");
}
}
else
{
SendClientMessage(playerid,COLOR_YELLOW,"Debes estar en Ammu-Nation");
}
return 1;
}
else if(strcmp(cmdtext, "m4", true) == 0) {
if(PlayerToPoint(5, playerid,364.11175, 1059.95654, 19.19139) || PlayerToPoint(5, playerid,-63.83909, -1477.56042, 10.44908) || PlayerToPoint(5, playerid,-673.11517, 1204.90148, 11.10896)){
new cash = GetPlayerMoney(playerid);
if(cash >= 1000) {
SendClientMessage(playerid,COLOR_YELLOW,"Compraste M4!");
SetPlayerWeapon(playerid,26,1000);
DecPlayerHandCash(playerid,1000);
}
if(cash < 999) {
SendClientMessage(playerid,COLOR_YELLOW,"Necesitas mas dinero!Necesitas $1000 para comprar M4!");
}
}
else
{
SendClientMessage(playerid,COLOR_YELLOW,"Debes estar en Ammu-Nation");
}
return 1;
}
else if(strcmp(cmdtext, "tec", true) == 0) {
if(PlayerToPoint(5, playerid,364.11175, 1059.95654, 19.19139) || PlayerToPoint(5, playerid,-63.83909, -1477.56042, 10.44908) || PlayerToPoint(5, playerid,-673.11517, 1204.90148, 11.10896)){
new cash = GetPlayerMoney(playerid);
if(cash >= 1000) {
SendClientMessage(playerid,COLOR_YELLOW,"Compraste Tec9!");
SetPlayerWeapon(playerid,22,1000);
DecPlayerHandCash(playerid,1000);
}
if(cash < 999) {
SendClientMessage(playerid,COLOR_YELLOW,"Necesitas mas dinero!Necesitas $1000 para comprar Tec9!");
}
}
else
{
SendClientMessage(playerid,COLOR_YELLOW,"Debes estar en Ammu-Nation");
}
return 1;
}
else if(strcmp(cmdtext, "ingrams", true) == 0) {
if(PlayerToPoint(5, playerid,364.11175, 1059.95654, 19.19139) || PlayerToPoint(5, playerid,-63.83909, -1477.56042, 10.44908) || PlayerToPoint(5, playerid,-673.11517, 1204.90148, 11.10896)){
new cash = GetPlayerMoney(playerid);
if(cash >= 1000) {
SendClientMessage(playerid,COLOR_YELLOW,"Compraste Ingrams!");
SetPlayerWeapon(playerid,24,1000);
DecPlayerHandCash(playerid,1000);
}
if(cash < 999) {
SendClientMessage(playerid,COLOR_YELLOW,"Necesitas mas dinero!Necesitas $1000 para comprar Ingrams!");
}
}
else
{
SendClientMessage(playerid,COLOR_YELLOW,"Debes estar en Ammu-Nation");
}
return 1;
}
else if(strcmp(cmdtext, "ruger", true) == 0) {
if(PlayerToPoint(5, playerid,364.11175, 1059.95654, 19.19139) || PlayerToPoint(5, playerid,-63.83909, -1477.56042, 10.44908) || PlayerToPoint(5, playerid,-673.11517, 1204.90148, 11.10896)){
new cash = GetPlayerMoney(playerid);
if(cash >= 1000) {
SendClientMessage(playerid,COLOR_YELLOW,"Compraste Ruger!");
SetPlayerWeapon(playerid,27,1000);
DecPlayerHandCash(playerid,1000);
}
if(cash < 999) {
SendClientMessage(playerid,COLOR_YELLOW,"Necesitas mas dinero!Necesitas $1000 para comprar Ruger!");
}
}
else
{
SendClientMessage(playerid,COLOR_YELLOW,"Debes estar en Ammu-Nation");
}
return 1;
}
else if(strcmp(cmdtext, "shotgun", true) == 0) {
if(PlayerToPoint(5, playerid,364.11175, 1059.95654, 19.19139) || PlayerToPoint(5, playerid,-63.83909, -1477.56042, 10.44908) || PlayerToPoint(5, playerid,-673.11517, 1204.90148, 11.10896)){
new cash = GetPlayerMoney(playerid);
if(cash >= 1000) {
SendClientMessage(playerid,COLOR_YELLOW,"Compraste Shotgun!");
SetPlayerWeapon(playerid,19,1000);
DecPlayerHandCash(playerid,1000);
}
if(cash < 999) {
SendClientMessage(playerid,COLOR_YELLOW,"Necesitas mas dinero!Necesitas $1000 para comprar Shotgun!");
}
}
else
{
SendClientMessage(playerid,COLOR_YELLOW,"Debes estar en Ammu-Nation");
}
return 1;
}
else if(strcmp(cmdtext, "granadas", true) == 0) {
if(PlayerToPoint(5, playerid,364.11175, 1059.95654, 19.19139) || PlayerToPoint(5, playerid,-63.83909, -1477.56042, 10.44908) || PlayerToPoint(5, playerid,-673.11517, 1204.90148, 11.10896)){
new cash = GetPlayerMoney(playerid);
if(cash >= 1000) {
SendClientMessage(playerid,COLOR_YELLOW,"Compraste Shotgun!");
SetPlayerWeapon(playerid,12,1000);
DecPlayerHandCash(playerid,1000);
}
if(cash < 999) {
SendClientMessage(playerid,COLOR_YELLOW,"Necesitas mas dinero!Necesitas $1000 para comprar Granadas!");
}
}
else
{
SendClientMessage(playerid,COLOR_YELLOW,"Debes estar en Ammu-Nation");
}
return 1;
}
else if(strcmp(cmdtext, "vida", true) == 0) {
if(PlayerToPoint(5, playerid,364.11175, 1059.95654, 19.19139) || PlayerToPoint(5, playerid,-63.83909, -1477.56042, 10.44908) || PlayerToPoint(5, playerid,-673.11517, 1204.90148, 11.10896)){
new cash = GetPlayerMoney(playerid);
if(cash >= 1000) {
SendClientMessage(playerid,COLOR_YELLOW,"Compraste Vida!");
SetPlayerHealth(playerid,100.0);
DecPlayerHandCash(playerid,1000);
}
if(cash < 999) {
SendClientMessage(playerid,COLOR_YELLOW,"Necesitas mas dinero!Necesitas $1000 para comprar Vida!");
}
}
else
{
SendClientMessage(playerid,COLOR_YELLOW,"Debes estar en Ammu-Nation");
}
return 1;
}
else if(strcmp(cmdtext, "katana", true) == 0) {
if(PlayerToPoint(5, playerid,364.11175, 1059.95654, 19.19139) || PlayerToPoint(5, playerid,-63.83909, -1477.56042, 10.44908) || PlayerToPoint(5, playerid,-673.11517, 1204.90148, 11.10896)){
new cash = GetPlayerMoney(playerid);
if(cash >= 1000) {
SendClientMessage(playerid,COLOR_YELLOW,"Compraste Katana!");
SetPlayerWeapon(playerid,10,1);
DecPlayerHandCash(playerid,1000);
}
if(cash < 999) {
SendClientMessage(playerid,COLOR_YELLOW,"Necesitas mas dinero!Necesitas $1000 para comprar Katana!");
}
}
else
{
SendClientMessage(playerid,COLOR_YELLOW,"Debes estar en Ammu-Nation");
}
return 1;
}
else if(strcmp(cmdtext, "m60", true) == 0) {
if(PlayerToPoint(5, playerid,364.11175, 1059.95654, 19.19139) || PlayerToPoint(5, playerid,-63.83909, -1477.56042, 10.44908) || PlayerToPoint(5, playerid,-673.11517, 1204.90148, 11.10896)){
new cash = GetPlayerMoney(playerid);
if(cash >= 1000) {
SendClientMessage(playerid,COLOR_YELLOW,"Compraste M60!");
SetPlayerWeapon(playerid,32,1000);
DecPlayerHandCash(playerid,1000);
}
if(cash < 999) {
SendClientMessage(playerid,COLOR_YELLOW,"Necesitas mas dinero!Necesitas $1000 para comprar M60!");
}
}
else
{
SendClientMessage(playerid,COLOR_YELLOW,"Debes estar en Ammu-Nation");
}
return 1;
}[/pawn]
DO YOU LIKE MY COMMANDS?? GIVE ME THANKS OR CREDITS IN YOU SCRIPT.. AND I CREATE MORE COMMANDS FOR FUN
-
i don't under stand ( PlayerToPoint?, DecPlayerHandCash?,) where is the [ stock or public ] that goes with those
-
use:
[pawn]public PlayerToPoint(Float:radi, playerid, Float:x, Float:y, Float:z)
{
new Float:oldposx, Float:oldposy, Float:oldposz;
new Float:tempposx, Float:tempposy, Float:tempposz;
GetPlayerPos(playerid, oldposx, oldposy, oldposz);
tempposx = (oldposx -x);
tempposy = (oldposy -y);
tempposz = (oldposz -z);
if (((tempposx < radi) && (tempposx > -radi)) && ((tempposy < radi) && (tempposy > -radi)) && ((tempposz < radi) && (tempposz > -radi)))
{
return 1;
}
return 0;
}[/pawn]
DecPlayerHandCash
[pawn]public DecPlayerCash(playerid,amount)
{
new mon = GetPlayerCash(playerid)-amount;
format(INFO,256, REGISTERS, gPlayers[playerid]);
dini_IntSet(INFO, "Cash", mon);
SetPlayerMoney(playerid,mon);
}[/pawn]
-
new mon = GetPlayerCash(playerid)-amount;
format(INFO,256, REGISTERS, gPlayers[playerid]);
dini_IntSet(INFO, "Cash", mon);
SetPlayerMoney(playerid,mon);
dude, where is INFO defined, also, what's the point of writing into a file which will never be used ( he is clearly not using GUPS ).
-
nice +rep just remember all your defines, stocks, and public's
-
nice +rep just remember all your defines, stocks, and public's
i forget put the public playertopoint :D