Pawno e le sue funzioni

Stato
Discussione chiusa ad ulteriori risposte.

manugiordano 15

Utente Electrum
13 Marzo 2011
148
33
2
107
Ultima modifica:
Come creare un teletrasporto:
if (strcmp("/mycommand", cmdtext, true, 10) == 0)
{
SendClientMessage(playerid, COLOR_BASIC, "Testo che vuoi che legge il player quando digita il comando.");
SetPlayerPos(playerid, x, y, z);
SetPlayerFacingAngle(playerid, 90);
return 1;
}


allora CLOLOR_BASIC può essere modificato nel colore che si preferisce
_____________________________________________________
Comandi per ricaricarsi la vita


if(strcmp(cmdtext, "/mycommand", true) == 0)
{
SetPlayerHealth(playerid, 100);[100 e la quantità di vita]
SendClientMessage(playerid,COLOR_BASIC,"testo quando digiti il comando.");
PlayerPlaySound(playerid, 1150, 0.0, 0.0, 0.0);[suono del comando]
return 1;
}
_______________________________________________________
comandi per ricaricarsi l' armour:
if(strcmp(cmdtext, "/mycommand", true) == 0)
{
SetPlayerArmour(playerid, 100);[quantità di armatura (100)]
SendClientMessage(playerid,COLOR_BASIC,"testo.");
PlayerPlaySound(playerid, 1150, 0.0, 0.0, 0.0);[suono del comando]
return 1;
}
_________________________________________________________
comando per spawnare una arma o oggetto:
if(strcmp(cmdtext, "/mycommand", true) == 0)
{
GivePlayerWeapon(playerid, [idarma], [ammo]);
SendClientMessage(playerid,COLOR_BASIC,"testo di quando si digita.");
PlayerPlaySound(playerid, 1150, 0.0, 0.0, 0.0);[suono del comando]
return 1;
}
_____________________________________________________________
qui non modificate nnt verra meglio,il comando server per startare il conto che parte da 5:


if(strcmp(cmdtext,"/countdown",true)==0)
{
if(IsCountdownStarted == false)
{
Count = 5;
CountdownTimer = SetTimer("CountDown", 1000, 1);
IsCountdownStarted = true;
SendClientMessage(playerid, COLOR_BASIC, "Ai startato countdown (/countdown)!");
new countstring[256];
new PlayerName[MAX_PLAYER_NAME];
GetPlayerName(playerid,PlayerName, MAX_PLAYER_NAME);
format(countstring, sizeof(countstring), "%s Ai startato countdown (/countdown)", PlayerName);
SendClientMessageToAll(COLOR_GREY, countstring);
}
else
{
SendClientMessage(playerid, COLOR_RED, "Ai startato countdown (/countdown)!");
}
return 1;


_________________________________________________________________
if(!strcmp(cmdtext, "/Drunk", true))
{
SetPlayerDrunkLevel(playerid, 3000);(durata del level drunk)
return 1;
}
__________________________________________________________
Script per cambiare nome alla gamemode
SetGameModeText("nome gm");


_____________________________________________________________
Script per aggiungere camminata cj
UsePlayerPedAnims();
_______________________________________________________________
stili di combattimento:
FIGHT_STYLE_KUNGFU)
FIGHT_STYLE_NORMA
FIGHT_STYLE_BOXING
FIGHT_STYLE_GRABKICK
________________________________________________________________
Creare icone sulla mappa


SetPlayerMapIcon( playerid, id, x,y, z, id, 0);
_____________________________________________________________
questo e tutti accetto reputazione lol
guida in aggiornamento
ciaooo

INSERITE CREDITI
 
Stato
Discussione chiusa ad ulteriori risposte.