29.07.2014, 12:54
(
Последний раз редактировалось goldenpower; 30.07.2014 в 10:52.
)
dcmd_goto(playerid,params[]) {
new ID;
if(PlayerInfo[playerid][Level] >= 0 || IsPlayerAdmin(playerid)) {
if(!strlen(params)) return SendClientMessage(playerid,red,"Напиши: /goto [играч]");
if(GotoDisabled[ID] == 1)
{
GameTextForPlayer(playerid,"~w~goto~r~off!",2000,3 );
return 1;
}
}
else
{
new player1, string[128];
if(!IsNumeric(params)) player1 = ReturnPlayerID(params);
else player1 = strval(params);
if(IsPlayerConnected(player1) && player1 != INVALID_PLAYER_ID && player1 != playerid) {
new Float, Float:y, Float:z; GetPlayerPos(player1,x,y,z); SetPlayerInterior(playerid,GetPlayerInterior(playe r1));
SetPlayerVirtualWorld(playerid,GetPlayerVirtualWor ld(player1));
ResetPlayerWeapons(playerid);
if(GetPlayerState(playerid) == 2) {
SetVehiclePos(GetPlayerVehicleID(playerid),x+3,y,z ); LinkVehicleToInterior(GetPlayerVehicleID(playerid) ,GetPlayerInterior(player1));
SetVehicleVirtualWorld(GetPlayerVehicleID(playerid ),GetPlayerVirtualWorld(player1));
ResetPlayerWeapons(playerid);
} else SetPlayerPos(playerid,x+2,y,z);
format(string,sizeof(string),"Вие телепортирахте до \"%s\"", pName(player1));
return SendClientMessage(playerid,blue,string);
} else return SendClientMessage(playerid, red, "Няма тъкъв играч");
} else return SendClientMessage(playerid,red,"Грешка: Трябва да си на по висок левел за да използваш тази команда!");
}
(2441) : error 029: invalid expression, assumed zero
(2441) : error 001: expected token: ";", but found "return"
new ID;
if(PlayerInfo[playerid][Level] >= 0 || IsPlayerAdmin(playerid)) {
if(!strlen(params)) return SendClientMessage(playerid,red,"Напиши: /goto [играч]");
if(GotoDisabled[ID] == 1)
{
GameTextForPlayer(playerid,"~w~goto~r~off!",2000,3 );
return 1;
}
}
else
{
new player1, string[128];
if(!IsNumeric(params)) player1 = ReturnPlayerID(params);
else player1 = strval(params);
if(IsPlayerConnected(player1) && player1 != INVALID_PLAYER_ID && player1 != playerid) {
new Float, Float:y, Float:z; GetPlayerPos(player1,x,y,z); SetPlayerInterior(playerid,GetPlayerInterior(playe r1));
SetPlayerVirtualWorld(playerid,GetPlayerVirtualWor ld(player1));
ResetPlayerWeapons(playerid);
if(GetPlayerState(playerid) == 2) {
SetVehiclePos(GetPlayerVehicleID(playerid),x+3,y,z ); LinkVehicleToInterior(GetPlayerVehicleID(playerid) ,GetPlayerInterior(player1));
SetVehicleVirtualWorld(GetPlayerVehicleID(playerid ),GetPlayerVirtualWorld(player1));
ResetPlayerWeapons(playerid);
} else SetPlayerPos(playerid,x+2,y,z);
format(string,sizeof(string),"Вие телепортирахте до \"%s\"", pName(player1));
return SendClientMessage(playerid,blue,string);
} else return SendClientMessage(playerid, red, "Няма тъкъв играч");
} else return SendClientMessage(playerid,red,"Грешка: Трябва да си на по висок левел за да използваш тази команда!");
}
(2441) : error 029: invalid expression, assumed zero
(2441) : error 001: expected token: ";", but found "return"