Author Topic: [REQ] Pawno Functions on VCMP  (Read 7540 times)

0 Members and 1 Guest are viewing this topic.

Offline Hancock

  • Street Thug
  • *
  • Posts: 25
  • Hancock Of The Forum of vice city Multiplayer ;D
    • View Profile
[REQ] Pawno Functions on VCMP
« on: January 16, 2010, 05:41:25 pm »
Hi, Im wondering how to use functions in VCMP like


Code: [Select]
SendClientMessage(playerid, COLOR_ORANGE, "!goto !heal /c wep !hp !info !fight")
the users need some help like:

Quote
SendClientMessage(playerid, ColorNameHere, "TextHere")

This is just 1 example we need More Examples like announce and setting positions and stuff

Thank you.
Hancock Of VC-MP


Offline thijn

  • LU testers
  • VC:MP Veteran
  • *
  • Posts: 667
  • Im proud to be pro.
    • View Profile
    • Vice Underdogs
Re: [REQ] Pawno Functions on VCMP
« Reply #1 on: January 16, 2010, 05:55:43 pm »
All these functions can be found in a_vcmp.inc
I will list them here:
Quote from: a_vcmp.inc
print(const string[]);
printf(const format[], {Float,_}:...);
format(output[], len, const format[], {Float,_}:...);
SendClientMessage(playerid, color, const format[]);
SendClientMessageToAll(color, const format[]);
SendDeathMessage(killer,killee,weapon);
GameTextForAll(const string[]);
GameTextForPlayer(playerid,const string[]);
GameTextForAllBottom(const string[]);
GameTextForPlayerBottom(playerid,const string[]);
SetTimer(funcname[], interval, repeating);
KillTimer(timerid);
GetTickCount();
GetMaxPlayers();
SetMaxPlayers(maxplayers);

SetGameModeText(const string[]);
SetTeamCount(count);
AddPlayerClass(modelid, Float:spawn_x, Float:spawn_y, Float:spawn_z, Float:z_angle, weapon1, weapon1_ammo, weapon2, weapon2_ammo, weapon3, weapon3_ammo);
AddPlayerClassEx(teamid, modelid, Float:spawn_x, Float:spawn_y, Float:spawn_z, Float:z_angle, weapon1, weapon1_ammo, weapon2, weapon2_ammo, weapon3, weapon3_ammo);
AddStaticVehicle(modelid, Float:spawn_x, Float:spawn_y, Float:spawn_z, Float:z_angle, color1, color2);
AddStaticPickup(id,type,Float:X,Float:Y,Float:Z);
SetWorldBounds(Float:x_max,Float:x_min,Float:y_max,Float:y_min);
ShowPlayerMarkers(show);
GameModeExit();
SetWorldTime(hour);
GetWeaponName(weaponid, const weapon[], len);
SetGravity(Gravity);
ResetNormalGravity();
SetGamespeed(Gamespeed);
ResetNormalGamespeed();
ToggleWhiteScanlinesForAll(set);
ToggleWhiteScanlinesForPlayer(playerid, set);
ToggleGreenScanlinesForAll(set);
ToggleGreenScanlinesForPlayer(playerid, set);
ToggleWidescreenForAll(set);
ToggleWidescreenForPlayer(playerid, set);
Countdown(status);
SetWaterLevel(Float:L);



IsPlayerAdmin(playerid);
Kick(playerid);
Ban(playerid);

SetPlayerStartPos(Float:x, Float:y, Float:z);
SetPlayerTeam(playerid, teamid);
SetPlayerFriendlyFire(ff);
GetPlayerTeam(playerid);
SetPlayerSkin(playerid, skinid);
SetPlayerScore(playerid,score);
GetPlayerScore(playerid);
GetPlayerPos(playerid, &Float:x, &Float:y, &Float:z);
SetPlayerPos(playerid, Float:x, Float:y, Float:z, Float:r, inter);
GetPlayerHealth(playerid, &Float:health);
SetPlayerHealth(playerid, Float:health);
GetPlayerArmour(playerid, &Float:armour);
SetPlayerArmour(playerid, Float:armour);
GetPlayerWeapon(playerid);
SetPlayerWeapon(playerid, weaponid, ammo);
PutPlayerInVehicle(playerid, vehicleid);
RemovePlayerFromVehicle(playerid);
IsPlayerInVehicle(playerid, vehicleid);
IsPlayerInAnyVehicle(playerid);
IsPlayerDriver_Passanger(playerid);
GetPlayerName(playerid, const name[], len);
SetPlayerColor(playerid,color);
GetPlayerColor(playerid);
GetPlayerVehicleID(playerid);
SetCameraPos(Float:x, Float:y, Float:z);
SetCameraLookAt(Float:x, Float:y, Float:z);
TogglePlayerControllable(playerid, toggle);
SetPlayerAnimation(playerid, anim);
SetPlayerDrunk(playerid, visuals, handling);
GivePlayerMoney(playerid,money);
SetPlayerMoney(id,amount);
SetPlayerFacingAngle(playerid,Float:ang);
GetPlayerFacingAngle(playerid,&Float:ang);
GetPlayerMoney(playerid);
ResetPlayerMoney(playerid);
IsPlayerConnected(playerid);
GetPlayerState(playerid);
ResetPlayerWeapons(playerid);
GivePlayerWeapon(playerid, weaponid, ammo);
GetPlayerIp(playerid, const name[], len);
GetPlayerPing(playerid);
GetPlayerIDFromName(const name[]);
SetPlayerDriveOnWater(set);
SetWeaponDamage(weaponid,damage);
SetSpikes(playerid,bool);
RemovePlayerMarker(playerid);
SetPlayerMarker(playerid,colour);
SetWantedLevel(playerid,level);
DisableDriveby(playerid,bool);
PerfectHandling(bool);
Flyingcars(bool);
Taxiboostjump(bool);
FastSwitch(bool);
Jumpswitch(bool);
Syncframelimiter(bool);
EnableStuntBike(playerid,bool);
EnableShootInAir(playerid,bool);


CreateVehicle(vehicletype, Float:x, Float:y, Float:z, Float:rotation, color1, color2, respawn_delay);
GetVehiclePos(vehicleid, &Float:x, &Float:y, &Float:z);
SetVehiclePos(vehicleid, Float:x, Float:y, Float:z,Float:rot);
SetVehicleHealth(vehicleid, Float:health);
GetVehicleHealth(vehicleid, &Float:health);
SetVehicleToRespawn(vehicleid);
ChangeVehicleColor(vehicleid, color1, color2);
SetVehicleDoorsStatus(vehicleid,bool);
SetVehicleTyre(vehicleid,bool);
KillVehicleEngine(vehicleid);
PutDirectlyInVehicle(playerid,vehicleid);
SetVehicleAlarm(vehicleid,bool);
SetVehicleLights(vehicleid,bool);

That was just 5 mins work

Offline Hancock

  • Street Thug
  • *
  • Posts: 25
  • Hancock Of The Forum of vice city Multiplayer ;D
    • View Profile
Re: [REQ] Pawno Functions on VCMP
« Reply #2 on: January 16, 2010, 06:04:57 pm »
Thank you thijn , its a liiittle bit not clear (Float and bool and const name funcname[], interval, repeating len) xD
Hancock Of VC-MP


Offline thijn

  • LU testers
  • VC:MP Veteran
  • *
  • Posts: 667
  • Im proud to be pro.
    • View Profile
    • Vice Underdogs
Re: [REQ] Pawno Functions on VCMP
« Reply #3 on: January 16, 2010, 06:28:52 pm »
hehe,
Float is like 123.456
and a Bool is true or false

Offline [AoD]NC

  • VC:MP Beta Tester
  • VC:MP Veteran
  • *
  • Posts: 616
  • AoD forever!
    • View Profile
    • KURWA MAĆ
Re: [REQ] Pawno Functions on VCMP
« Reply #4 on: January 17, 2010, 12:48:31 am »
Hancock is right. Ofc we need the syntax, but examples too :p.
* [AoD]NC waits for a wiki and roll eyes.

Offline Ettans

  • VC:MP Beta Tester
  • Wiseguy
  • *
  • Posts: 56
    • View Profile
Re: [REQ] Pawno Functions on VCMP
« Reply #5 on: January 19, 2010, 10:24:25 am »
Thank you thijn , its a liiittle bit not clear (Float and bool and const name funcname[], interval, repeating len) xD


I assume the last part is about SetTimer. If so:


Code: [Select]
SetTimer("HelloWorld",5000,1); // Ran every 5000ms/5 seconds, repeating (1)

public HelloWorld()
{
    //do something
}

If you need any more examples, let me know.
« Last Edit: January 19, 2010, 10:51:28 am by Ettans »

Offline Boss

  • VC:MP Beta Tester (inactive)
  • Made Man
  • *
  • Posts: 229
  • Boss
    • View Profile
    • TDH Clan Site
Re: [REQ] Pawno Functions on VCMP
« Reply #6 on: January 19, 2010, 02:06:52 pm »
* [AoD]NC waits for a wiki and roll eyes.
Here you go.
I'm not so good at editing those evil wikis, so I can only fill it with info once you make the basic pages with proper formatting. ^^