• Welcome to Vice City Multiplayer.
 
Menu

Show posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Show posts Menu

Messages - Robd

#31
Quote from: Madara on March 29, 2011, 10:27:33 PM
Quote from: Robd on March 29, 2011, 10:20:59 PM
This is actualy 90% GUPS that I modified, let me modify to add credits.

Ok, but need put rest commands with their duties of consultation relating to property, and so your system properties are 100% complete.
Yes sir, please don't tell the admins on me  ):
#32
mIRC/pawn Scripting / Re: Anti-Speed hack
March 29, 2011, 10:27:44 PM
The only thing you can really do for anti crash is try to kick players with names that will crash scripts.
#33
ShowRoom (pawn) / Re: GUPS 1.16a
March 29, 2011, 10:26:24 PM
Quote from: yazeen on March 29, 2011, 06:11:58 AM
Tamas can u fix the Addprop, Addveh please!!!
There isn't much anyone can do about the Addveh until VCMP gets updated (haha nice joke) as AddPlayerVehicle, SetVehiclePos, and SendRconCommand are all bugged.
#34
This is actualy 90% GUPS that I modified, let me modify to add credits.
Quote from: yazeen on March 29, 2011, 07:17:09 AM
Errors Found:

C:\Documents and Settings\yachu\Desktop\Vcmp\Gamemodes\RPG Server\RPG Server\gamemodes\FSRPG.pwn(2276) : error 033: array must be indexed (variable "pickup")
C:\Documents and Settings\yachu\Desktop\Vcmp\Gamemodes\RPG Server\RPG Server\gamemodes\FSRPG.pwn(2277) : error 033: array must be indexed (variable "pickup")
C:\Documents and Settings\yachu\Desktop\Vcmp\Gamemodes\RPG Server\RPG Server\gamemodes\FSRPG.pwn(2279) : error 033: array must be indexed (variable "pickup")
C:\Documents and Settings\yachu\Desktop\Vcmp\Gamemodes\RPG Server\RPG Server\gamemodes\FSRPG.pwn(2280) : error 033: array must be indexed (variable "pickup")
C:\Documents and Settings\yachu\Desktop\Vcmp\Gamemodes\RPG Server\RPG Server\gamemodes\FSRPG.pwn(2283) : error 033: array must be indexed (variable "pickup")



C:\Documents and Settings\yachu\Desktop\Vcmp\Gamemodes\RPG Server\RPG Server\gamemodes\FSRPG.pwn(68) : error 021: symbol already defined: "income"
C:\Documents and Settings\yachu\Desktop\Vcmp\Gamemodes\RPG Server\RPG Server\gamemodes\FSRPG.pwn(77) : error 021: symbol already defined: "pickup"


Errors  8)
As far as I can tell, somewhere in the script that you started using someone already setup a variable named pickup, either rename mine or remove theirs. If anyone else gets this error please let me know.
#35
ShowRoom (pawn) / Re: Some useful script
March 29, 2011, 03:41:46 AM
Quote from: Madara on March 28, 2011, 08:36:30 PM
Quote from: Robd on March 28, 2011, 04:10:22 AM
Quote from: tato on March 27, 2011, 09:33:37 AM
and what's wrong with the speedometer

wow i always forget stuff
add this to PlayerInfo

incar

and then

OnPlayerEnterVehicle

PlayerInfo[playerid][incar] = 1;
OnPlayerExitVehicle
PlayerInfo[playerid][incar] = 0;

Unnecessary function: "PlayerInfo [playerid] [incar] = 1;": "incar" because for that exist the function IsPlayerInAnyVehicle (playerid), and this function should be put in the "speedometer" next to "IsPlayerConnected (i)"
ISPlayerInAnyVehicle only works if it's a drive, this works of rpassengers too, pplus its easy for me to remember, lol
#36
ShowRoom (pawn) / Re: Some usefull functions
March 29, 2011, 03:40:15 AM
Wow, you could have given me a chance to answer that question of yours properly. Btw, I made a road block so EHH!
#37
mIRC/pawn Scripting / Re: Anti-Speed hack
March 29, 2011, 03:37:59 AM
Quote from: [AoD]NC on March 28, 2011, 03:43:30 PM
Quote from: Robd on March 28, 2011, 04:03:53 AM
like i said just copy it straight from a speedometer, if speed exceeds  certain amount then recognise a hacker

But it will ban also players with high ping, because they packets are sent not so often as by not lagging players (that's why car sync is mostly "warpy").
Thats true if you set it to slightly above normal, but if you set it at a riduculous speed (like half accross the map in seconds) then there's no way they lag that bad, if they do then getting kicked from your server is the least of their worries.
#38
ShowRoom (pawn) / Property System (With /c addprop)
March 29, 2011, 03:31:11 AM
Please forgive me if anything is missing. If you get any errors please report them and I will probably know what's wrong.

Original GUPS property commands (the ones that are not modified)
else if (strcmp(cmd, "!buyprop", true) == 0) {
new szMsg[256],cost,prop,owner;
tmp = strtok(cmdtext,idx);
prop = dini_Int(file, "prop");
cost = dini_Int("/Properties/prices.ini", tmp);
    if (PlayerInfo[playerid][Logged] != 1) SendClientMessage(playerid,COLOR_GREEN,"You have to log in first");
    else if(!strlen(tmp)) SendClientMessage(playerid,COLOR_GREEN, "USAGE: !buyprop [PropertyID]");
    else if(prop == 2) SendClientMessage(playerid,COLOR_GREEN,"You can only own 2 props");
    else if(!IsPropertyForSale(tmp)) SendClientMessage(playerid,COLOR_GREEN, "Error: That prop is not for sale!");
else if (GetPlayerHandCash(gPlayers[playerid]) < cost) SendClientMessage(playerid,COLOR_GREEN,"Not enough money");
else {
new prop2;
prop2 = prop +1;
format(szMsg,sizeof(szMsg),"%d",prop2);
dini_Set(file, "Prop", szMsg);
dini_Set("/Properties/owners.ini", tmp, gPlayers[playerid]);
SendClientMessage(playerid,COLOR_GREEN,"You succesfully bought a property");
SendClientMessage(playerid,COLOR_GREEN,"You can use !propname to change its name");
DecPlayerHandCash(playerid,cost);
}
return 1;
}
else if (strcmp(cmd, "!sellprop", true) == 0) {
new prop;
prop = prop = dini_Int(file, "prop");
    tmp = strtok(cmdtext, idx);
if(PlayerInfo[playerid][Logged] != 1) SendClientMessage(playerid, COLOR_RED, "You need to login first!");
else if(!strlen(tmp)) SendClientMessage(playerid,COLOR_GREEN, "USAGE: !sellprop [PropertyID]");
else if(!IsPropertyExist(tmp)) SendClientMessage(playerid,COLOR_GREEN, "Error: Unknown Property");
else if(!IsPropertyOwner(tmp,playerid)) SendClientMessage(playerid,COLOR_GREEN, "Error: That property is not yours!");
else {
new cost,prop2,szMsg[256]; cost = GetPropertyCost(tmp);
prop = prop -1;
format(szMsg,sizeof(szMsg),"%d",prop2);
dini_Set(file, "Prop", szMsg);
format(file, sizeof(file), "/Properties/owners.ini", "owners");
dini_Set(file, tmp, "none");
IncPlayerHandCash(playerid,cost);
format(szMsg,sizeof(szMsg),"Property Sold! Earned:[ $%d ]",cost);
SendClientMessage(playerid,COLOR_GREEN,szMsg);
}
return 1;
}
else if (strcmp(cmd, "!propname", true) == 0) {
new tmp2[256];
        tmp = strtok(cmdtext, idx),tmp2 = strtok(cmdtext, idx);
        if(!strlen(tmp2)) SendClientMessage(playerid,COLOR_GREEN,"Use !propname <propid> <name>");
else if(!IsPropertyOwner(tmp,playerid)) SendClientMessage(playerid,COLOR_GREEN, "Error: That property is not yours!");
else {
dini_Set("/Properties/names.ini",tmp,tmp2);
SendClientMessage(playerid,COLOR_GREEN,"Property name set");
}
}
else if (strcmp(cmd, "!shareprop", true) == 0) {
    new tmp2[256], plr; tmp = strtok(cmdtext, idx), tmp2 = strtok(cmdtext, idx), plr = FindPlayerIDFromString(tmp2);
if(PlayerInfo[playerid][Logged] != 1) SendClientMessage(playerid, COLOR_RED, "You need to login first!");
else if(!strlen(tmp2)) SendClientMessage(playerid,COLOR_GREEN, "USAGE: !shareprop [PropertyID] [Nick/ID]");
else if(!IsPropertyExist(tmp)) SendClientMessage(playerid,COLOR_GREEN, "Error: Unknown Property");
else if(!IsPropertyOwner(tmp,playerid)) SendClientMessage(playerid,COLOR_GREEN, "Error: You do not own that property!");
else if(plr == INACTIVE_PLAYER_ID) SendClientMessage(playerid,COLOR_RED,"Error: Unknown player");
else if(IsPropertyShared(tmp)) SendClientMessage(playerid,COLOR_RED,"Error: Property already shared.");
else {
if(!IsPlayerRegistered(gPlayers[plr])) {
format(szMsg,sizeof(szMsg),"Error: %s is not a registered nick!",gPlayers[plr]);
SendClientMessageToAll(COLOR_GREEN,szMsg);
return 1;
}
format(file, sizeof(file), "/Properties/share.ini", "share");
dini_Set(file, tmp, gPlayers[plr]);

format(szMsg,sizeof(szMsg),"Property shared with:[ %s ]",gPlayers[plr]);
SendClientMessage(playerid,COLOR_GREEN,szMsg);
}
return 1;
}
else if (strcmp(cmd, "!delshareprop", true) == 0) {
    tmp = strtok(cmdtext, idx);
if(PlayerInfo[playerid][Logged] != 1) SendClientMessage(playerid, COLOR_RED, "You need to login first!");
else if(!strlen(tmp)) SendClientMessage(playerid,COLOR_GREEN, "USAGE: !delshareprop [PropertyID]");
else if(!IsPropertyExist(tmp)) SendClientMessage(playerid,COLOR_GREEN, "Error: Unknown Property");
else if(!IsPropertyOwner(tmp,playerid)) SendClientMessage(playerid,COLOR_GREEN, "Error: You do not own that property!");
else if(!IsPropertyShared(tmp)) SendClientMessage(playerid,COLOR_RED,"Error: That property is not shared.");
else {
format(file, sizeof(file), "/Properties/share.ini", "share");
dini_Set(file, tmp, "none");

format(szMsg,sizeof(szMsg),"Property:[ %s ] share deleted.",tmp);
SendClientMessage(playerid,COLOR_GREEN,szMsg);
}
return 1;
}

**Modified from GUPS**

Before starting add the following INIs in /scriptfiles/properts (if you dont have this directory just make it)

  • sum.ini
  • income.ini
  • names.ini
  • prices.ini
  • owners.ini
  • share.ini
Add this somehwere below all the #define lines

enum picInfo
{
isprop,
propname,
income,
incomes,
collections
}

enum sInfo
{
incomes,
pickup
}

new ServerInfo[1][sInfo];
new PickupInfo[200][picInfo];


Add to OnGameModeInit

LoadProps()

Somewhere at the bottom of script

public LoadProps()
{
print("Loading props, please wait...");
new XU;
if(!dini_Exists("/Properties/sum.ini")) return -1;
new data[7][256];
for (XU=1; XU<=250; XU++) {
new pos[256],fm[6];
format(fm,sizeof(fm),"%d",XU);
pos = dini_Get("/Properties/sum.ini",fm);
if (strlen(pos)) {
split(pos,data,' ');
ServerInfo[0][pickup] = ServerInfo[0][pickup] +1;
AddStaticPickup(ServerInfo[0][pickup],407,strval(data[0]),floatstr(data[1]),floatstr(data[2]));
//printf("Creating Prop! Pickup ID:%d Prop ID: %d",ServerInfo[0][pickup],XU);
PickupInfo[ServerInfo[0][pickup]][isprop] = 1;
PickupInfo[ServerInfo[0][pickup]][propname] = XU;
new szMsg[256];
format(szMsg,sizeof(szMsg),"%d",XU);
PickupInfo[ServerInfo[0][pickup]][income] = dini_Int("/Properties/income.ini", szMsg);
ServerInfo[0][incomes] = 1;
}
}
printf("Props Loaded!");
return asp;
}


Add to OnPlayerCommandText

else if (strcmp(cmd, "addprop", true) == 0) {
new tmp2[256],tmp3[256],tmp4[256];
tmp = strtok(cmdtext,idx);
tmp2 = strtok(cmdtext,idx);
tmp3 = strtok(cmdtext,idx);
tmp4 = strtok(cmdtext,idx);
else if(!strlen(tmp4)) SendClientMessage(playerid,COLOR_GREEN,"Use /c addprop <cost> <income> <ID> <Name>");
else if (!IsNumeric(tmp) || !IsNumeric(tmp2) || !IsNumeric(tmp3)) SendClientMessage(playerid,COLOR_GREEN, "Cost, income, and ID must be numbers");
else {
new Float:x,Float:y,Float:z,szMsg[256],id[256];
format(szMsg,sizeof(szMsg),"Added - Cost: $%s Income: $%s ID: %s Name: %s",tmp,tmp2,tmp3,tmp4);
SendClientMessage(playerid,COLOR_GREEN,szMsg);
GetPlayerPos(playerid,x,y,z);
format(szMsg,sizeof(szMsg),"%f %f %f",x,y,z);
format(id,sizeof(id),"%d",strval(tmp3));
dini_Set("/Properties/sum.ini",id,szMsg);
dini_Set("/Properties/income.ini",id,tmp2);
dini_Set("/Properties/names.ini",id,tmp4);
dini_Set("/Properties/prices.ini",id,tmp);
dini_Set("/Properties/owners.ini",id,"none");
dini_Set("/Properties/share.ini",id,"none");
}
return 1;
}


Add to OnPickedUp

if (PickupInfo[pickupid][isprop] == 1) {
       new szMsg[256],owner[256],cost,shared[256],name[256];
owner = GetPropertyOwner(PickupInfo[pickupid][propname]);
cost = GetPropertyCost(IntToStr(PickupInfo[pickupid][propname]));
shared = GetPropertyShare(PickupInfo[pickupid][propname]);
name = GetPropertyName(PickupInfo[pickupid][propname]);

       new money,string[256],collects;
if(strcmp(owner, gPlayers[playerid], true) == 0) {
           PickupInfo[pickupid][collections] = PickupInfo[pickupid][collections] +1;
   collects = ServerInfo[0][incomes] -PickupInfo[pickupid][collections] +1;
   money = collects * PickupInfo[pickupid][income];
   if(collects == 0) {
       PickupInfo[pickupid][collections] = PickupInfo[pickupid][collections] -1;
format(szMsg,sizeof(szMsg),">>> %s <<<",name);
       SendClientMessage(playerid,COLOR_GREEN,szMsg);
format(szMsg,sizeof(szMsg),"ID:[ %d ] Value:[ %d ]",PickupInfo[pickupid][propname],cost);
SendClientMessage(playerid,COLOR_GREEN,szMsg);
SendClientMessage(playerid,COLOR_GREEN,"Earnings: $0");
}
else {
IncPlayerHandCash(playerid,money);
format(szMsg,sizeof(szMsg),">>> %s <<<",name);
       SendClientMessage(playerid,COLOR_GREEN,szMsg);
format(szMsg,sizeof(szMsg),"ID:[ %d ] Value:[ %d ]",PickupInfo[pickupid][propname],cost);
SendClientMessage(playerid,COLOR_GREEN,szMsg);
format(szMsg,sizeof(szMsg),"Earnings: $%d",money);
SendClientMessage(playerid,COLOR_GREEN,szMsg);
}
}
else if(strcmp(owner, "none", true) == 0) {
   format(szMsg,sizeof(szMsg),">>> %s <<<",name);
           SendClientMessage(playerid,COLOR_GREEN,szMsg);
format(szMsg,sizeof(szMsg),"ID:[ %d ] Cost:[ %d ]",PickupInfo[pickupid][propname],cost);
SendClientMessage(playerid,COLOR_GREEN,szMsg);
}
else if(strcmp(shared, "none", true) == 0) {
format(szMsg,sizeof(szMsg),">>> %s <<<",name);
SendClientMessage(playerid,COLOR_GREEN,szMsg);
format(szMsg,sizeof(szMsg),"ID:[ %d ] Owner:[ %s ]",PickupInfo[pickupid][propname],owner);
SendClientMessage(playerid,COLOR_GREEN,szMsg);
}
else {
format(szMsg,sizeof(szMsg),">>> %s <<<",name);
SendClientMessage(playerid,COLOR_GREEN,szMsg);
format(szMsg,sizeof(szMsg),"ID:[ %d ] Owner:[ %s ] Shared:[ %s ]",PickupInfo[pickupid][propname],owner,shared);
SendClientMessage(playerid,COLOR_GREEN,szMsg);
}
return 1;


And for the income to show up...
Add this to OnGameModInit

SetTimer("Payday",900000,true);

Back to the bottom of the script

public Payday()
{
   ServerInfo[0][incomes] = ServerInfo[0][incomes] +1;
   for(new i = 0; i <= MAX_PLAYERS; i++) {
       if(IsPlayerConnected(i) == 1) {
GameTextForAll("Payday!!!!");
}
}
}
#39
General Discussion / Re: Freestylez Role-play
March 28, 2011, 04:11:01 AM
Wow, just because someone has a similar idea...
#40
ShowRoom (pawn) / Re: Some useful script
March 28, 2011, 04:10:22 AM
Quote from: tato on March 27, 2011, 09:33:37 AM
and what's wrong with the speedometer

wow i always forget stuff
add this to PlayerInfo

incar

and then

OnPlayerEnterVehicle

PlayerInfo[playerid][incar] = 1;
OnPlayerExitVehicle
PlayerInfo[playerid][incar] = 0;
#41
This is pointless, for one thing warnings aren't really hurting you. And second, the whole point of that warning is to tell you if you aren't using a symbol that it's just lagging scripts. This doesnt fix that. Just delete the symbol to clean up the script.
#42
ShowRoom (pawn) / Re: GUPS 1.16a
March 28, 2011, 04:05:03 AM
Yes, very
Quote from: yazeen on March 18, 2011, 02:34:23 PM
Addpickup and addveh Bugged
#43
mIRC/pawn Scripting / Re: Anti-Speed hack
March 28, 2011, 04:03:53 AM
like i said just copy it straight from a speedometer, if speed exceeds  certain amount then recognise a hacker
#44
Falcon, I'd like to see some of your scripting man, open up the server, I'll run 90% of it for ya if you need me too.
#45
mIRC/pawn Scripting / Re: Need Help?
March 27, 2011, 07:41:35 AM
Exceed 15 what?