• Welcome to Vice City Multiplayer.
 

[REQ] Pawno Functions on VCMP

Started by Hancock, January 16, 2010, 02:41:25 PM

Previous topic - Next topic

0 Members and 2 Guests are viewing this topic.

Hancock

Hi, Im wondering how to use functions in VCMP like


SendClientMessage(playerid, COLOR_ORANGE, "!goto !heal /c wep !hp !info !fight")

the users need some help like:

QuoteSendClientMessage(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


thijn

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


Hancock

Thank you thijn , its a liiittle bit not clear (Float and bool and const name funcname[], interval, repeating len) xD
Hancock Of VC-MP


thijn

hehe,
Float is like 123.456
and a Bool is true or false


[AoD]NC

Hancock is right. Ofc we need the syntax, but examples too :p.
* [AoD]NC waits for a wiki and roll eyes.

Ettans

#5
Quote from: Hancock on January 16, 2010, 03:04:57 PM
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:


SetTimer("HelloWorld",5000,1); // Ran every 5000ms/5 seconds, repeating (1)

public HelloWorld()
{
   //do something
}


If you need any more examples, let me know.

Boss

Quote from: [AoD]NC on January 16, 2010, 09:48:31 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. ^^