crazyzee Posted April 1, 2013 Posted April 1, 2013 Salut , am si eu o problema , cred ca tine de comanda /sellbiz , pentru ca atunci cand dau /sellbiz , bizz-u se vinde insa eu daca vreau sa cumpar altul imi zice ca deja am un bizz .Ce as putea sa fac [pawn]if(strcmp(cmd, "/sellbiz", true) == 0) { if(IsPlayerConnected(playerid)) { GetPlayerName(playerid, playername, sizeof(playername)); if(PlayerInfo[playerid][pPbiskey] == 255) { SendClientMessage(playerid, COLOR_WHITE, "Ne pare rau, dar nu detineti un Business"); return 1; } if(PlayerInfo[playerid][pMarried] > 0) { SendClientMessage(playerid, COLOR_WHITE, "Ne pare rau, dar sunteti Casatorit asa ca nu puteti vinde acest Business."); return 1; } if(PlayerInfo[playerid][pPbiskey] >= 100 && strcmp(playername, SBizzInfo[PlayerInfo[playerid][pPbiskey]-100][sbOwner], true) == 0) { new bouse = PlayerInfo[playerid][pPbiskey]-100; GivePlayerMoney(playerid,SBizzInfo[bouse][sbBuyPrice]); SBizzInfo[bouse][sbLocked] = 1; SBizzInfo[bouse][sbOwned] = 0; GetPlayerName(playerid, sendername, sizeof(sendername)); strmid(SBizzInfo[bouse][sbOwner], "The State", 0, strlen("The State"), 255); strmid(SBizzInfo[bouse][sbExtortion], "No-one", 0, strlen("No-one"), 255); ConsumingMoney[playerid] = 1; PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0); format(string, sizeof(string), "~w~Felicitari~n~ Ati vandut business-ul ~n~~g~%d$", SBizzInfo[bouse][sbTill]); GameTextForPlayer(playerid, string, 10000, 3); PlayerInfo[playerid][pPbiskey] = 255; OnPropUpdate(); OnPlayerUpdate(playerid); return 1; } if(strcmp(playername, BizzInfo[PlayerInfo[playerid][pPbiskey]][bOwner], true) == 0) { new bouse = PlayerInfo[playerid][pPbiskey]; BizzInfo[bouse][bLocked] = 1; BizzInfo[bouse][bOwned] = 0; GetPlayerName(playerid, sendername, sizeof(sendername)); strmid(BizzInfo[bouse][bOwner], "The State", 0, strlen("The State"), 255); strmid(BizzInfo[bouse][bExtortion], "No-one", 0, strlen("No-one"), 255); ConsumingMoney[playerid] = 1; GivePlayerMoney(playerid,BizzInfo[bouse][bBuyPrice]); PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0); format(string, sizeof(string), "~w~FElicitari~n~ Ati vandut business-ul ~n~~g~%d$", BizzInfo[bouse][bTill]); GameTextForPlayer(playerid, string, 10000, 3); PlayerInfo[playerid][pPbiskey] = 255; OnPropUpdate(); OnPlayerUpdate(playerid); format(string, sizeof(string), "Business Bot: %s a vandut bizz-ul cu ID-ul %d.", sendername, bouse); ABroadCast(COLOR_YELLOW,string,1); return 1; } else { SendClientMessage(playerid, COLOR_WHITE, "Ne pare rau, dar nu detineti un Business.."); } } return 1; }[/pawn] RPG.VIBEPLAY.RORecomand acest server Romanesc bY woozie aka. weedluver aka. undertaker !!
KosTy Posted April 1, 2013 Posted April 1, 2013 Salut incearca asta da ca team ajutat +1 te rog[pawn] if(strcmp(cmd, "/sellbiz", true) == 0) { if(IsPlayerConnected(playerid)) { GetPlayerName(playerid, playername, sizeof(playername)); if(PlayerInfo[playerid][pPbiskey] == 255) { SendClientMessage(playerid, COLOR_WHITE, "You don't own a bizz."); return 1; } if(PlayerInfo[playerid][pMarried] > 0) { SendClientMessage(playerid, COLOR_GREY, " You are Married, can't sell the House !"); return 1; } if(PlayerInfo[playerid][pPbiskey] >= 100 && strcmp(playername, SBizzInfo[PlayerInfo[playerid][pPbiskey]-100][sbOwner], true) == 0) { new bouse = PlayerInfo[playerid][pPbiskey]-100; GivePlayerMoney(playerid,SBizzInfo[bouse][sbBuyPrice]); SBizzInfo[bouse][sbLocked] = 1; SBizzInfo[bouse][sbOwned] = 0; GetPlayerName(playerid, sendername, sizeof(sendername)); strmid(SBizzInfo[bouse][sbOwner], "The State", 0, strlen("The State"), 255); strmid(SBizzInfo[bouse][sbExtortion], "No-one", 0, strlen("No-one"), 255); ConsumingMoney[playerid] = 1; PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0); format(string, sizeof(string), "~w~Congratulations~n~ You have sold your property for ~n~~g~$%d", SBizzInfo[bouse][sbTill]); GameTextForPlayer(playerid, string, 10000, 3); SBizzInfo[bouse][sbTill] = 0; PlayerInfo[playerid][pPbiskey] = 255; OnPropUpdate(); OnPlayerSaveData(playerid); OnPropTextdrawUpdate(3, bouse); return 1; } if(strcmp(playername, BizzInfo[PlayerInfo[playerid][pPbiskey]][bOwner], true) == 0) { new bouse = PlayerInfo[playerid][pPbiskey]; BizzInfo[bouse][bLocked] = 1; BizzInfo[bouse][bOwned] = 0; GetPlayerName(playerid, sendername, sizeof(sendername)); strmid(BizzInfo[bouse][bOwner], "The State", 0, strlen("The State"), 255); strmid(BizzInfo[bouse][bExtortion], "No-one", 0, strlen("No-one"), 255); ConsumingMoney[playerid] = 1; GivePlayerMoney(playerid,BizzInfo[bouse][bBuyPrice]); PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0); format(string, sizeof(string), "~w~Congratulations~n~ You have sold your property for ~n~~g~$%d", BizzInfo[bouse][bTill]); GameTextForPlayer(playerid, string, 10000, 3); BizzInfo[bouse][bTill] = 0; PlayerInfo[playerid][pPbiskey] = 255; OnPropUpdate(); OnPlayerSaveData(playerid); OnPropTextdrawUpdate(2, bouse); return 1; } else { SendClientMessage(playerid, COLOR_WHITE, "You don't own a business."); } } return 1; }[/pawn] Respecta si vei fi Respectat
crazyzee Posted April 1, 2013 Author Posted April 1, 2013 Salut incearca asta da ca team ajutat +1 te rog[pawn] if(strcmp(cmd, "/sellbiz", true) == 0) { if(IsPlayerConnected(playerid)) { GetPlayerName(playerid, playername, sizeof(playername)); if(PlayerInfo[playerid][pPbiskey] == 255) { SendClientMessage(playerid, COLOR_WHITE, "You don't own a bizz."); return 1; } if(PlayerInfo[playerid][pMarried] > 0) { SendClientMessage(playerid, COLOR_GREY, " You are Married, can't sell the House !"); return 1; } if(PlayerInfo[playerid][pPbiskey] >= 100 && strcmp(playername, SBizzInfo[PlayerInfo[playerid][pPbiskey]-100][sbOwner], true) == 0) { new bouse = PlayerInfo[playerid][pPbiskey]-100; GivePlayerMoney(playerid,SBizzInfo[bouse][sbBuyPrice]); SBizzInfo[bouse][sbLocked] = 1; SBizzInfo[bouse][sbOwned] = 0; GetPlayerName(playerid, sendername, sizeof(sendername)); strmid(SBizzInfo[bouse][sbOwner], "The State", 0, strlen("The State"), 255); strmid(SBizzInfo[bouse][sbExtortion], "No-one", 0, strlen("No-one"), 255); ConsumingMoney[playerid] = 1; PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0); format(string, sizeof(string), "~w~Congratulations~n~ You have sold your property for ~n~~g~$%d", SBizzInfo[bouse][sbTill]); GameTextForPlayer(playerid, string, 10000, 3); SBizzInfo[bouse][sbTill] = 0; PlayerInfo[playerid][pPbiskey] = 255; OnPropUpdate(); OnPlayerSaveData(playerid); OnPropTextdrawUpdate(3, bouse); return 1; } if(strcmp(playername, BizzInfo[PlayerInfo[playerid][pPbiskey]][bOwner], true) == 0) { new bouse = PlayerInfo[playerid][pPbiskey]; BizzInfo[bouse][bLocked] = 1; BizzInfo[bouse][bOwned] = 0; GetPlayerName(playerid, sendername, sizeof(sendername)); strmid(BizzInfo[bouse][bOwner], "The State", 0, strlen("The State"), 255); strmid(BizzInfo[bouse][bExtortion], "No-one", 0, strlen("No-one"), 255); ConsumingMoney[playerid] = 1; GivePlayerMoney(playerid,BizzInfo[bouse][bBuyPrice]); PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0); format(string, sizeof(string), "~w~Congratulations~n~ You have sold your property for ~n~~g~$%d", BizzInfo[bouse][bTill]); GameTextForPlayer(playerid, string, 10000, 3); BizzInfo[bouse][bTill] = 0; PlayerInfo[playerid][pPbiskey] = 255; OnPropUpdate(); OnPlayerSaveData(playerid); OnPropTextdrawUpdate(2, bouse); return 1; } else { SendClientMessage(playerid, COLOR_WHITE, "You don't own a business."); } } return 1; }[/pawn]Cred ca problema este de la /buybiz , pentru ca atunci cand vreau sa cumpar alt biz imi zice in chat " You already own a business " .Revin cu edit sa vad daca rezolv .EDIT: Am adaugat comanda ta si imi da erorile astea :[pawn]D:\Backup SAMP Server\gamemodes\godfatherNEW.pwn(33514) : error 017: undefined symbol "OnPlayerSaveData"D:\Backup SAMP Server\gamemodes\godfatherNEW.pwn(33515) : error 017: undefined symbol "OnPropTextdrawUpdate"D:\Backup SAMP Server\gamemodes\godfatherNEW.pwn(33534) : error 017: undefined symbol "OnPlayerSaveData"D:\Backup SAMP Server\gamemodes\godfatherNEW.pwn(33535) : error 017: undefined symbol "OnPropTextdrawUpdate"Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase4 Errors.[/pawn] RPG.VIBEPLAY.RORecomand acest server Romanesc bY woozie aka. weedluver aka. undertaker !!
D@rksone Posted April 1, 2013 Posted April 1, 2013 Comanda: /buybiz sau /cumparbiz//----------------------------------[BIZZ]----------------------------------------------- if(strcmp(cmd,"/buybiz",true)==0 || strcmp(cmd, "/cumparbiz", true) == 0) // By Darksone { if(IsPlayerConnected(playerid)) { new Float:oldposx, Float:oldposy, Float:oldposz; GetPlayerName(playerid, playername, sizeof(playername)); GetPlayerPos(playerid, oldposx, oldposy, oldposz); if(PlayerInfo[playerid][pPhousekey] != 255) { SendClientMessage(playerid, COLOR_WHITE, " Detii deja un bizz!Tasteaza /sellbiz sau /vandbiz dupa care poti executa aceasta comanda."); return 1; } for(new b = 0; b < sizeof(SBizzInfo); b++) { if(PlayerToPoint(2.0, playerid, SBizzInfo[b][sbEntranceX], SBizzInfo[b][sbEntranceY], SBizzInfo[b][sbEntranceZ]) && SBizzInfo[b][sbOwned] == 0) { if(PlayerInfo[playerid][pLevel] < SBizzInfo[b][sbLevelNeeded]) { format(string, sizeof(string), "Ai nevoie de level %d pentru a cumpara aceasta afacere",SBizzInfo[b][sbLevelNeeded]); SendClientMessage(playerid, COLOR_GRAD5, string); return 1; } if(GetPlayerMoney(playerid) > SBizzInfo[b][sbBuyPrice]) { PlayerInfo[playerid][pPbiskey] = b+100; SBizzInfo[b][sbOwned] = 1; GetPlayerName(playerid, sendername, sizeof(sendername)); strmid(SBizzInfo[b][sbOwner], sendername, 0, strlen(sendername), 255); GivePlayerMoneyGR(playerid,-SBizzInfo[b][sbBuyPrice]); PlayerPlayMusic(playerid); SendClientMessage(playerid, COLOR_WHITE, "Felicitari pentru noua ta achizitie."); SendClientMessage(playerid, COLOR_WHITE, "Foloseste /help pentru a revedea comenzile disponibile afacerii tale."); DateProp(playerid); OnPropUpdate(); OnPlayerUpdate(playerid); return 1; } else { SendClientMessage(playerid, COLOR_WHITE, "Nu ai destui bani pentru aceasta achizitie"); return 1; } } } for(new b = 0; b < sizeof(BizzInfo); b++) { if(PlayerToPoint(2.0, playerid, BizzInfo[b][bEntranceX], BizzInfo[b][bEntranceY], BizzInfo[b][bEntranceZ]) && BizzInfo[b][bOwned] == 0) { if(PlayerInfo[playerid][pLevel] < BizzInfo[b][bLevelNeeded]) { format(string, sizeof(string), "Ai nevoie de level %d pentru aceasta achizitie",BizzInfo[b][bLevelNeeded]); SendClientMessage(playerid, COLOR_GRAD5, string); return 1; } if(GetPlayerMoney(playerid) > BizzInfo[b][bBuyPrice]) { PlayerInfo[playerid][pPbiskey] = b; BizzInfo[b][bOwned] = 1; GetPlayerName(playerid, sendername, sizeof(sendername)); strmid(BizzInfo[b][bOwner], sendername, 0, strlen(sendername), 255); GivePlayerMoneyGR(playerid,-BizzInfo[b][bBuyPrice]); PlayerPlayMusic(playerid); SetPlayerInterior(playerid,BizzInfo[b][bInterior]); PlayerInfo[playerid][pInt] = BizzInfo[b][bInterior]; SetPlayerPos(playerid,BizzInfo[b][bExitX],BizzInfo[b][bExitY],BizzInfo[b][bExitZ]); GameTextForPlayer(playerid, "~w~Bun venit~n~Poti sa iesi din acest loc tastand /afara", 5000, 3); PlayerInfo[playerid][pInt] = BizzInfo[b][bInterior]; PlayerInfo[playerid][pLocal] = b ; SendClientMessage(playerid, COLOR_WHITE, "Felicitari pentru noua ta achizitie"); SendClientMessage(playerid, COLOR_WHITE, "Tasteaza /help pentru a revedea comenzile disponibile afacerii tale"); DateProp(playerid); OnPropUpdate(); OnPlayerUpdate(playerid); return 1; } else { SendClientMessage(playerid, COLOR_WHITE, "Nu ai destui bani pentru aceasta"); return 1; } } } } return 1; } Aici , tu poti edita comanda "/cumparbiz" in alta comanda: if(strcmp(cmd,"/buybiz",true)==0 || strcmp(cmd, "/cumparbiz", true) == 0) Comanda: /sellbiz sau /vandbiz if(strcmp(cmd,"/sellbiz",true)==0 || strcmp(cmd, "/vandbiz", true) == 0) // By Darksone { if(IsPlayerConnected(playerid)) { GetPlayerName(playerid, playername, sizeof(playername)); if(PlayerInfo[playerid][pPbiskey] == 255) { SendClientMessage(playerid, COLOR_WHITE, "You don't own a bizz."); return 1; } if(PlayerInfo[playerid][pMarried] > 0) { SendClientMessage(playerid, COLOR_GREY, " You are Married, can't sell the House !"); return 1; } if(PlayerInfo[playerid][pPbiskey] != 255 && strcmp(playername, SBizzInfo[PlayerInfo[playerid][pPbiskey]-100][sbOwner], true) == 0) { new bouse = PlayerInfo[playerid][pPbiskey]-100; GivePlayerMoneyGR(playerid,SBizzInfo[bouse][sbTill]); SBizzInfo[bouse][sbLocked] = 1; SBizzInfo[bouse][sbOwned] = 0; GetPlayerName(playerid, sendername, sizeof(sendername)); strmid(SBizzInfo[bouse][sbOwner], "Stat LS", 0, strlen("Stat LS"), 255); strmid(SBizzInfo[bouse][sbExtortion], "Nimeni", 0, strlen("Nimeni"), 255); //ConsumingMoney[playerid] = 1; PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0); format(string, sizeof(string), "Ti-ai vandut afacerea cu~n~~g~$%d", SBizzInfo[bouse][sbTill]); GameTextForPlayer(playerid, string, 10000, 3); SBizzInfo[bouse][sbTill] = 0; PlayerInfo[playerid][pPbiskey] = 255; OnPropUpdate(); OnPlayerUpdate(playerid); return 1; } if(strcmp(playername, BizzInfo[PlayerInfo[playerid][pPbiskey]][bOwner], true) == 0) { new bouse = PlayerInfo[playerid][pPbiskey]; BizzInfo[bouse][bLocked] = 1; BizzInfo[bouse][bOwned] = 0; GetPlayerName(playerid, sendername, sizeof(sendername)); strmid(BizzInfo[bouse][bOwner], "Stat LS", 0, strlen("Stat LS"), 255); strmid(BizzInfo[bouse][bExtortion], "Nimeni", 0, strlen("Nimeni"), 255); //ConsumingMoney[playerid] = 1; GivePlayerMoneyGR(playerid,BizzInfo[bouse][bTill]); PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0); format(string, sizeof(string), "~w~Felicitari~n~ Ti-ai vandut proprietatea pentru ~n~~g~$%d", BizzInfo[bouse][bTill]); GameTextForPlayer(playerid, string, 10000, 3); BizzInfo[bouse][bTill] = 0; PlayerInfo[playerid][pPbiskey] = 255; OnPropUpdate(); OnPlayerUpdate(playerid); return 1; } else { SendClientMessage(playerid, COLOR_WHITE, "Nu detii nicio afacere."); } } return 1; } Aici , tu poti edita comanda "/vandbiz" in alta comanda: if(strcmp(cmd,"/sellbiz",true)==0 || strcmp(cmd, "/vandbiz", true) == 0) Rareori ne gândim la ceea ce avem, dar mereu la ceea ce ne lipseşte
crazyzee Posted April 1, 2013 Author Posted April 1, 2013 Da man dar uite trebuie sa definesc asta si nu stiu cum [pawn]D:\Backup SAMP Server\gamemodes\godfatherNEW.pwn(33426) : error 017: undefined symbol "GivePlayerMoneyGR"D:\Backup SAMP Server\gamemodes\godfatherNEW.pwn(33458) : error 017: undefined symbol "GivePlayerMoneyGR"D:\Backup SAMP Server\gamemodes\godfatherNEW.pwn(33501) : error 017: undefined symbol "GivePlayerMoneyGR"D:\Backup SAMP Server\gamemodes\godfatherNEW.pwn(33526) : error 017: undefined symbol "GivePlayerMoneyGR"Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase4 Errors.[/pawn] RPG.VIBEPLAY.RORecomand acest server Romanesc bY woozie aka. weedluver aka. undertaker !!
KosTy Posted April 1, 2013 Posted April 1, 2013 Man in loc de GivePlayerMoneyGR Pui GivePlayerMoney si va Merge Respecta si vei fi Respectat
crazyzee Posted April 1, 2013 Author Posted April 1, 2013 Da am facut intre timp mi-am dat seama insa acum imi zice unknown comand desi le-am pus ok in gm :( RPG.VIBEPLAY.RORecomand acest server Romanesc bY woozie aka. weedluver aka. undertaker !!
KosTy Posted April 1, 2013 Posted April 1, 2013 Nu recunoaste comanda incearca sa adaugi asa in loc sa adaugi asta if(strcmp(cmd, "/sellbiz", true) == 0) Respecta si vei fi Respectat
crazyzee Posted April 1, 2013 Author Posted April 1, 2013 Rezolvat RPG.VIBEPLAY.RORecomand acest server Romanesc bY woozie aka. weedluver aka. undertaker !!
Question
crazyzee
Salut , am si eu o problema , cred ca tine de comanda /sellbiz , pentru ca atunci cand dau /sellbiz , bizz-u se vinde insa eu daca vreau sa cumpar altul imi zice ca deja am un bizz .
Ce as putea sa fac
[pawn]if(strcmp(cmd, "/sellbiz", true) == 0)
{
if(IsPlayerConnected(playerid))
{
GetPlayerName(playerid, playername, sizeof(playername));
if(PlayerInfo[playerid][pPbiskey] == 255)
{
SendClientMessage(playerid, COLOR_WHITE, "Ne pare rau, dar nu detineti un Business");
return 1;
}
if(PlayerInfo[playerid][pMarried] > 0)
{
SendClientMessage(playerid, COLOR_WHITE, "Ne pare rau, dar sunteti Casatorit asa ca nu puteti vinde acest Business.");
return 1;
}
if(PlayerInfo[playerid][pPbiskey] >= 100 && strcmp(playername, SBizzInfo[PlayerInfo[playerid][pPbiskey]-100][sbOwner], true) == 0)
{
new bouse = PlayerInfo[playerid][pPbiskey]-100;
GivePlayerMoney(playerid,SBizzInfo[bouse][sbBuyPrice]);
SBizzInfo[bouse][sbLocked] = 1;
SBizzInfo[bouse][sbOwned] = 0;
GetPlayerName(playerid, sendername, sizeof(sendername));
strmid(SBizzInfo[bouse][sbOwner], "The State", 0, strlen("The State"), 255);
strmid(SBizzInfo[bouse][sbExtortion], "No-one", 0, strlen("No-one"), 255);
ConsumingMoney[playerid] = 1;
PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);
format(string, sizeof(string), "~w~Felicitari~n~ Ati vandut business-ul ~n~~g~%d$", SBizzInfo[bouse][sbTill]);
GameTextForPlayer(playerid, string, 10000, 3);
PlayerInfo[playerid][pPbiskey] = 255;
OnPropUpdate();
OnPlayerUpdate(playerid);
return 1;
}
if(strcmp(playername, BizzInfo[PlayerInfo[playerid][pPbiskey]][bOwner], true) == 0)
{
new bouse = PlayerInfo[playerid][pPbiskey];
BizzInfo[bouse][bLocked] = 1;
BizzInfo[bouse][bOwned] = 0;
GetPlayerName(playerid, sendername, sizeof(sendername));
strmid(BizzInfo[bouse][bOwner], "The State", 0, strlen("The State"), 255);
strmid(BizzInfo[bouse][bExtortion], "No-one", 0, strlen("No-one"), 255);
ConsumingMoney[playerid] = 1;
GivePlayerMoney(playerid,BizzInfo[bouse][bBuyPrice]);
PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);
format(string, sizeof(string), "~w~FElicitari~n~ Ati vandut business-ul ~n~~g~%d$", BizzInfo[bouse][bTill]);
GameTextForPlayer(playerid, string, 10000, 3);
PlayerInfo[playerid][pPbiskey] = 255;
OnPropUpdate();
OnPlayerUpdate(playerid);
format(string, sizeof(string), "Business Bot: %s a vandut bizz-ul cu ID-ul %d.", sendername, bouse);
ABroadCast(COLOR_YELLOW,string,1);
return 1;
}
else
{
SendClientMessage(playerid, COLOR_WHITE, "Ne pare rau, dar nu detineti un Business..");
}
}
return 1;
}[/pawn]
RPG.VIBEPLAY.RO
Recomand acest server Romanesc bY woozie aka. weedluver aka. undertaker !!
10 answers to this question
Recommended Posts