24.12.2010, 22:05
Go into your 0.3c folder and open the pawno there, then when your in pawno press ctrl+o and open your file and recompile.
Also change code to this
Also change code to this
pawn Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
if(!strcmp(cmdtext, "/me", true, 3)) // 3 is the length of /me
{
if(!cmdtext[3])return SendClientMessage(playerid, 0xFF0000FF, "USAGE: /me [action]");
new str[128];
GetPlayerName(playerid, str, sizeof(str));
format(str, sizeof(str), "* %s %s", str, cmdtext[4]);
new Float:posx, Float:posy, Float:posz;
GetPlayerPos(playerid, posx, posy, posz);
for(new i=0; i<MAX_PLAYERS; i++)
{
if (IsPlayerConnected(i))
{
if(GetPlayerVirtualWorld(i) == GetPlayerVirtualWorld(playerid))
{
if(IsPlayerInRangeOfPoint(i,30,posx, posy, posz))
{
SendClientMessage(i, COLOR_PURPLE, str);
}
}
}
}
return 1;
}
if(!strcmp(cmdtext, "/LAC", true, 3)) // 3 is the length of /me
{
if(!cmdtext[3])return SendClientMessage(playerid, 0xFF0000FF, "USAGE: /lac [localchat]");
new str[128];
GetPlayerName(playerid, str, sizeof(str));
format(str, sizeof(str), "((LOOC)) %s %s", str, cmdtext[4]);
new Float:posx, Float:posy, Float:posz;
GetPlayerPos(playerid, posx, posy, posz);
for(new i=0; i<MAX_PLAYERS; i++)
{
if (IsPlayerConnected(i))
{
if(GetPlayerVirtualWorld(i) == GetPlayerVirtualWorld(playerid))
{
if(IsPlayerInRangeOfPoint(i,30,posx, posy, posz))
{
SendClientMessage(i, 0xFFFF00AA, str);
}
}
}
}
return 1;
}
if(!strcmp(cmdtext, "/ooc", true, 3)) // 3 is the length of /me
{
if(!cmdtext[3])return SendClientMessage(playerid, 0xFF0000FF, "USAGE: /ooc [action]");
new str[128];
GetPlayerName(playerid, str, sizeof(str));
format(str, sizeof(str), "((OOC)) %s : %s", str, cmdtext[4]);
SendClientMessageToAll(0xFFFF00AA, str);
return 1;
}
new engine,lights,alarm,doors,bonnet,boot,objective;
if(!strcmp(cmdtext, "/startengine", true, 3)) // 3 is the length of /me
{
new vid = GetPlayerVehicleID(playerid);
if(vid != INVALID_VEHICLE_ID) {
GetVehicleParamsEx(vid,engine,lights,alarm,doors,b onnet,boot,objective);
SetVehicleParamsEx(vid,VEHICLE_PARAMS_ON,lights,al arm,doors,bonnet,boot,objective);
}
return 1;
}
if(!strcmp(cmdtext, "/stopengine", true, 3)) // 3 is the length of /me
{
new vid = GetPlayerVehicleID(playerid);
if(vid != INVALID_VEHICLE_ID) {
GetVehicleParamsEx(vid,engine,lights,alarm,doors,b onnet,boot,objective);
SetVehicleParamsEx(vid,VEHICLE_PARAMS_OFF,lights,a larm,doors,bonnet,boot,objective);
return 1;
}
return 0;
}
pawn Код:
forward ProxDetector(Float:radi, playerid, string[], color);
public ProxDetector(Float:radi, playerid, string[], color)
{
new Float:posx, Float:posy, Float:posz;
GetPlayerPos(playerid, posx, posy, posz);
for(new i=0; i<MAX_PLAYERS; i++)
{
if (IsPlayerConnected(i))
{
if(GetPlayerVirtualWorld(i) == GetPlayerVirtualWorld(playerid))
{
if(IsPlayerInRangeOfPoint(i,radi,posx, posy, posz))
{
SendClientMessage(i, color, string);
}
}
}
}
}