• Welcome to Vice City Multiplayer.
 

Some usefull functions

Started by heekz.shadow, February 10, 2011, 07:47:47 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

yazeen

Quote from: BIG[H] on March 15, 2011, 08:07:00 PM
Maybe its would be better to use radius  60 - 90 ;D


Do u think changing radius works? it wont it only says the dirretion u should be more close to it m i right heekz?

heekz.shadow

Nope.

Just try to decrypt the code from PlayerToPoint and add the radius into SetWorldBounds


Pro Scripter[/b][/i][/u]

yazeen

Givvme 1 example man i cant get u pro

BIG[H]

public GETBACKHEREYOUFOOL()
{
    for(new i = 0; i <= MAX_PLAYERS; i++) if(IsPlayerConnected(i) == 1)  {
if(!PlayerToPoint(70,i,x,y,z) SetPlayerPos(i,x,y,z,1.00);
}


Add In Gamemodeint()
SetTimer("GETBACKHEREYOUFOOL",350,1);
My Guru FORUM MUST VISITmegavcmp.freeforums.org

BIG[H] = BIG HaLL

Robd

public Model(vehicleid)
{
new x[256];
    if (vehicleid == 130) x = "Land Stalker";
else if (vehicleid == 131) x = "Idaho";
else if (vehicleid == 132) x = "Stinger";
else if (vehicleid == 133) x = "Line Runner";
else if (vehicleid == 134) x = "Perennial";
else if (vehicleid == 135) x = "Sentinel";
else if (vehicleid == 136) x = "Rio";
else if (vehicleid == 137) x = "Fire Truck";
else if (vehicleid == 138) x = "Trash Master";
else if (vehicleid == 139) x = "Stretch";
else if (vehicleid == 140) x = "Manana";
    else if (vehicleid == 141) x = "Infernus";
else if (vehicleid == 142) x = "Voodo";
else if (vehicleid == 143) x = "Pony";
else if (vehicleid == 144) x = "Mule";
else if (vehicleid == 145) x = "Cheetah";
else if (vehicleid == 146) x = "Ambulance";
else if (vehicleid == 147) x = "Washington";
else if (vehicleid == 148) x = "Moon Beam";
else if (vehicleid == 149) x = "Esperanto";
else if (vehicleid == 150) x = "Taxi";
    else if (vehicleid == 151) x = "Washington";
else if (vehicleid == 152) x = "Bobcat";
else if (vehicleid == 153) x = "Ice Cream";
else if (vehicleid == 154) x = "Injection";
else if (vehicleid == 155) x = "Apache";
else if (vehicleid == 156) x = "Squad Car";
else if (vehicleid == 157) x = "Enforcer";
else if (vehicleid == 158) x = "Armored Car";
else if (vehicleid == 159) x = "Banshee";
else if (vehicleid == 160) x = "Coast Guard";
    else if (vehicleid == 161) x = "Bus";
else if (vehicleid == 162) x = "Tank";
else if (vehicleid == 163) x = "Baracks";
else if (vehicleid == 164) x = "Hermes";
else if (vehicleid == 165) x = "Police Maverick";
else if (vehicleid == 166) x = "Angel";
else if (vehicleid == 167) x = "Public Bus";
else if (vehicleid == 168) x = "Taxi";
else if (vehicleid == 169) x = "Stallion";
else if (vehicleid == 170) x = "Rumpo";
    else if (vehicleid == 171) x = "Bandit";
else if (vehicleid == 172) x = "Hearse";
else if (vehicleid == 173) x = "Packer";
else if (vehicleid == 174) x = "Sentinel";
else if (vehicleid == 175) x = "Admiral";
else if (vehicleid == 176) x = "Squalo";
else if (vehicleid == 177) x = "Sparrow";
else if (vehicleid == 178) x = "Pizza";
else if (vehicleid == 179) x = "Borrito";
else if (vehicleid == 180) x = "INVALID";
    else if (vehicleid == 181) x = "INVALID";
else if (vehicleid == 182) x = "Speeder";
else if (vehicleid == 183) x = "Reefer";
else if (vehicleid == 184) x = "Tropic";
else if (vehicleid == 185) x = "INVALID";
else if (vehicleid == 186) x = "Yankee";
else if (vehicleid == 187) x = "Golf Cart";
else if (vehicleid == 188) x = "l33t cab";
else if (vehicleid == 189) x = "Top Fun";
else if (vehicleid == 190) x = "Skimmer";
    else if (vehicleid == 191) x = "PCJ";
else if (vehicleid == 192) x = "Faggio";
else if (vehicleid == 193) x = "Freeway";
else if (vehicleid == 194) x = "Baron";
else if (vehicleid == 195) x = "Raider";
else if (vehicleid == 196) x = "Glendale";
else if (vehicleid == 197) x = "Oceanic";
else if (vehicleid == 198) x = "Sanchez";
else if (vehicleid == 199) x = "Sparrow";
else if (vehicleid == 200) x = "Patriot";
else if (vehicleid == 201) x = "Limo";
else if (vehicleid == 202) x = "Coast Guard";
else if (vehicleid == 203) x = "Dinghy";
else if (vehicleid == 204) x = "Hermes";
else if (vehicleid == 205) x = "Sabre";
else if (vehicleid == 206) x = "Sabre";
else if (vehicleid == 207) x = "Phoenix";
else if (vehicleid == 208) x = "Walton";
else if (vehicleid == 209) x = "Regina";
else if (vehicleid == 210) x = "Patriot";
else if (vehicleid == 211) x = "Deluxo";
else if (vehicleid == 212) x = "Burrito";
else if (vehicleid == 213) x = "Spand";
else if (vehicleid == 214) x = "Marquis";
else if (vehicleid == 215) x = "Baggage";
else if (vehicleid == 216) x = "Taxi";
else if (vehicleid == 217) x = "Maverick";
else if (vehicleid == 218) x = "Maverick";
else if (vehicleid == 219) x = "Rancher";
else if (vehicleid == 220) x = "Rancher";
else if (vehicleid == 221) x = "Virgo";
else if (vehicleid == 222) x = "Greenwood";
else if (vehicleid == 223) x = "Jetmax";
else if (vehicleid == 224) x = "Hotring";
else if (vehicleid == 225) x = "Monster Truck";
else if (vehicleid == 226) x = "Blista";
else if (vehicleid == 227) x = "Maverick";
else if (vehicleid == 228) x = "Boxville";
else if (vehicleid == 229) x = "Benson";
else if (vehicleid == 230) x = "Jeep";
else if (vehicleid == 231) x = "Goblin";
else if (vehicleid == 232) x = "Hotring";
else if (vehicleid == 233) x = "Hotring";
else if (vehicleid == 234) x = "Bloodring";
else if (vehicleid == 235) x = "Bloodring";
else if (vehicleid == 236) x = "Cheetah";
else x = "INVALID";
return x;
}


You send this a model and it returns the car's name. To get a model you might want to make an enum like this
enum cInfo
{
model
}

new CarInfo[180][cInfo];


then if you're using pawn find "LoadVehicles"
change to
public LoadVehicles()
{
print("Loading vehicles, please wait...");
new XU;
if(!dini_Exists("/Vehicles/list.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("/Vehicles/list.ini",fm);
if (strlen(pos)) {
new id;
            split(pos,data,' ');
id = AddStaticVehicle(strval(data[0]),floatstr(data[1]),floatstr(data[2]),floatstr(data[3]),floatstr(data[4]),strval(data[5]),strval(data[6]));
//printf("Creating Vehicle! ModelID:[ %d ] Colors:[ %d ; %d ]",strval(data[0]),strval(data[5]),strval(data[6]));
CarInfo[id][model] = strval(data[0]);
}
}
printf("Vehicles Loaded!");
return asp;
}
Hello, this is Robd from the past.
If you are seeing this I have either posted something stupid, forgotten something, started a stupid topic, or a combination of the three.

Please forgive us for this mistake.

Regards, management

yazeen

Quote from: Robd on March 23, 2011, 03:47:38 PM
public Model(vehicleid)
{
new x[256];
    if (vehicleid == 130) x = "Land Stalker";
else if (vehicleid == 131) x = "Idaho";
else if (vehicleid == 132) x = "Stinger";
else if (vehicleid == 133) x = "Line Runner";
else if (vehicleid == 134) x = "Perennial";
else if (vehicleid == 135) x = "Sentinel";
else if (vehicleid == 136) x = "Rio";
else if (vehicleid == 137) x = "Fire Truck";
else if (vehicleid == 138) x = "Trash Master";
else if (vehicleid == 139) x = "Stretch";
else if (vehicleid == 140) x = "Manana";
    else if (vehicleid == 141) x = "Infernus";
else if (vehicleid == 142) x = "Voodo";
else if (vehicleid == 143) x = "Pony";
else if (vehicleid == 144) x = "Mule";
else if (vehicleid == 145) x = "Cheetah";
else if (vehicleid == 146) x = "Ambulance";
else if (vehicleid == 147) x = "Washington";
else if (vehicleid == 148) x = "Moon Beam";
else if (vehicleid == 149) x = "Esperanto";
else if (vehicleid == 150) x = "Taxi";
    else if (vehicleid == 151) x = "Washington";
else if (vehicleid == 152) x = "Bobcat";
else if (vehicleid == 153) x = "Ice Cream";
else if (vehicleid == 154) x = "Injection";
else if (vehicleid == 155) x = "Apache";
else if (vehicleid == 156) x = "Squad Car";
else if (vehicleid == 157) x = "Enforcer";
else if (vehicleid == 158) x = "Armored Car";
else if (vehicleid == 159) x = "Banshee";
else if (vehicleid == 160) x = "Coast Guard";
    else if (vehicleid == 161) x = "Bus";
else if (vehicleid == 162) x = "Tank";
else if (vehicleid == 163) x = "Baracks";
else if (vehicleid == 164) x = "Hermes";
else if (vehicleid == 165) x = "Police Maverick";
else if (vehicleid == 166) x = "Angel";
else if (vehicleid == 167) x = "Public Bus";
else if (vehicleid == 168) x = "Taxi";
else if (vehicleid == 169) x = "Stallion";
else if (vehicleid == 170) x = "Rumpo";
    else if (vehicleid == 171) x = "Bandit";
else if (vehicleid == 172) x = "Hearse";
else if (vehicleid == 173) x = "Packer";
else if (vehicleid == 174) x = "Sentinel";
else if (vehicleid == 175) x = "Admiral";
else if (vehicleid == 176) x = "Squalo";
else if (vehicleid == 177) x = "Sparrow";
else if (vehicleid == 178) x = "Pizza";
else if (vehicleid == 179) x = "Borrito";
else if (vehicleid == 180) x = "INVALID";
    else if (vehicleid == 181) x = "INVALID";
else if (vehicleid == 182) x = "Speeder";
else if (vehicleid == 183) x = "Reefer";
else if (vehicleid == 184) x = "Tropic";
else if (vehicleid == 185) x = "INVALID";
else if (vehicleid == 186) x = "Yankee";
else if (vehicleid == 187) x = "Golf Cart";
else if (vehicleid == 188) x = "l33t cab";
else if (vehicleid == 189) x = "Top Fun";
else if (vehicleid == 190) x = "Skimmer";
    else if (vehicleid == 191) x = "PCJ";
else if (vehicleid == 192) x = "Faggio";
else if (vehicleid == 193) x = "Freeway";
else if (vehicleid == 194) x = "Baron";
else if (vehicleid == 195) x = "Raider";
else if (vehicleid == 196) x = "Glendale";
else if (vehicleid == 197) x = "Oceanic";
else if (vehicleid == 198) x = "Sanchez";
else if (vehicleid == 199) x = "Sparrow";
else if (vehicleid == 200) x = "Patriot";
else if (vehicleid == 201) x = "Limo";
else if (vehicleid == 202) x = "Coast Guard";
else if (vehicleid == 203) x = "Dinghy";
else if (vehicleid == 204) x = "Hermes";
else if (vehicleid == 205) x = "Sabre";
else if (vehicleid == 206) x = "Sabre";
else if (vehicleid == 207) x = "Phoenix";
else if (vehicleid == 208) x = "Walton";
else if (vehicleid == 209) x = "Regina";
else if (vehicleid == 210) x = "Patriot";
else if (vehicleid == 211) x = "Deluxo";
else if (vehicleid == 212) x = "Burrito";
else if (vehicleid == 213) x = "Spand";
else if (vehicleid == 214) x = "Marquis";
else if (vehicleid == 215) x = "Baggage";
else if (vehicleid == 216) x = "Taxi";
else if (vehicleid == 217) x = "Maverick";
else if (vehicleid == 218) x = "Maverick";
else if (vehicleid == 219) x = "Rancher";
else if (vehicleid == 220) x = "Rancher";
else if (vehicleid == 221) x = "Virgo";
else if (vehicleid == 222) x = "Greenwood";
else if (vehicleid == 223) x = "Jetmax";
else if (vehicleid == 224) x = "Hotring";
else if (vehicleid == 225) x = "Monster Truck";
else if (vehicleid == 226) x = "Blista";
else if (vehicleid == 227) x = "Maverick";
else if (vehicleid == 228) x = "Boxville";
else if (vehicleid == 229) x = "Benson";
else if (vehicleid == 230) x = "Jeep";
else if (vehicleid == 231) x = "Goblin";
else if (vehicleid == 232) x = "Hotring";
else if (vehicleid == 233) x = "Hotring";
else if (vehicleid == 234) x = "Bloodring";
else if (vehicleid == 235) x = "Bloodring";
else if (vehicleid == 236) x = "Cheetah";
else x = "INVALID";
return x;
}


You send this a model and it returns the car's name. To get a model you might want to make an enum like this
enum cInfo
{
model
}

new CarInfo[180][cInfo];


then if you're using pawn find "LoadVehicles"
change to
public LoadVehicles()
{
print("Loading vehicles, please wait...");
new XU;
if(!dini_Exists("/Vehicles/list.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("/Vehicles/list.ini",fm);
if (strlen(pos)) {
new id;
            split(pos,data,' ');
id = AddStaticVehicle(strval(data[0]),floatstr(data[1]),floatstr(data[2]),floatstr(data[3]),floatstr(data[4]),strval(data[5]),strval(data[6]));
//printf("Creating Vehicle! ModelID:[ %d ] Colors:[ %d ; %d ]",strval(data[0]),strval(data[5]),strval(data[6]));
CarInfo[id][model] = strval(data[0]);
}
}
printf("Vehicles Loaded!");
return asp;
}


Why u Did this noone asked u .u could make a new Topic and add it :P

Robd

Hello, this is Robd from the past.
If you are seeing this I have either posted something stupid, forgotten something, started a stupid topic, or a combination of the three.

Please forgive us for this mistake.

Regards, management

BIG[H]

Nah who said that you are pro in scripting? Can you make a keycard?
My Guru FORUM MUST VISITmegavcmp.freeforums.org

BIG[H] = BIG HaLL

BIG[H]

Simple But UseFull Function xD
public AllPlayers()
{
    for(new i = 0; i <= MAX_PLAYERS; i++) if(IsPlayerConnected(i) == 1)
        return i;
}

it  can be used in Freezeall and healall etc a short form of Script!
example :
stock FreezeAll()
{
new i = AllPlayers();
TogglePlayerControllable(i,0);
Plrinfo[i][adminfreezed] = 1;
}

This Script Never Fails!
My Guru FORUM MUST VISITmegavcmp.freeforums.org

BIG[H] = BIG HaLL

yazeen

Quote from: BIG[H] on March 25, 2011, 01:55:13 PM
Simple But UseFull Function xD
public AllPlayers()
{
    for(new i = 0; i <= MAX_PLAYERS; i++) if(IsPlayerConnected(i) == 1)
        return i;
}

it  can be used in Freezeall and healall etc a short form of Script!
example :
stock FreezeAll()
{
new i = AllPlayers();
TogglePlayerControllable(i,0);
Plrinfo[i][adminfreezed] = 1;
}

This Script Never Fails!

lol u just added  AllPlayers()
:P

BIG[H]

xD ! its easy you donot need to make MaxPlayers etc just
new fa = AllPlayers();
SetPlayerHealth(fa,100);
My Guru FORUM MUST VISITmegavcmp.freeforums.org

BIG[H] = BIG HaLL

yazeen

Quote from: BIG[H] on March 25, 2011, 05:25:36 PM
xD ! its easy you donot need to make MaxPlayers etc just
new fuckmydick = AllPlayers();
SetPlayerHealth(fuckmydick,100);
You are right

Robd

Quote from: BIG[H] on March 25, 2011, 08:19:18 AM
Nah who said that you are pro in scripting? Can you make a keycard?
Yes, make a pickup. OnPlayerPickup make a series of functions for that pickup. In those add a enum for the player and change it to that they do have keycard. then make a command (or a constant timer that detects range) that opens if they have picked it up.

;D

and no, im not pro, but im above average and i get it done.
Hello, this is Robd from the past.
If you are seeing this I have either posted something stupid, forgotten something, started a stupid topic, or a combination of the three.

Please forgive us for this mistake.

Regards, management

yazeen

Quote from: Robd on March 27, 2011, 07:18:39 AM
Quote from: BIG[H] on March 25, 2011, 08:19:18 AM
Nah who said that you are pro in scripting? Can you make a keycard?
Yes, make a pickup. OnPlayerPickup make a series of functions for that pickup. In those add a enum for the player and change it to that they do have keycard. then make a command (or a constant timer that detects range) that opens if they have picked it up.

;D

and no, im not pro, but im above average and i get it done.

@Robd Big[H] Means Not Making Pickup he mean making Random Keycard
For example Keycard is somwhere at Vice Beach Finding it will give u 1k
If he Finds it the next will be other location and other price

BIG[H]

not possible With pIckups With pawn while Between server running BUt possible in MIRC
But it is also possible in Pawn by PlayerToPoint!
My Guru FORUM MUST VISITmegavcmp.freeforums.org

BIG[H] = BIG HaLL