wow. i tried somthing similure to that. but i did new id1[250] and thats why it wasnt working. I have to say The SA-MP community seems to be far better then other coding comminitys out there like Runuo. i didnt get flamed and told to use the search button a hundred times. well here is my code works like a charm thanks.
Код:
dcmd_p2p(playerid, params[])
{
new id1, id2;
if(sscanf(params, "uu", id1, id2)) return SystemMsg(playerid, "USAGE: /p2p <player 1 id> <player 2 id>");
else
{
if(id1 != id2)
{
if (IsPlayerConnected(id1))
{
if (IsPlayerConnected(id2))
{
new Float:pPos[ 3 ];
GetPlayerPos(id1, pPos[ 0 ], pPos[ 1 ], pPos[ 2 ] );
SetPlayerPos( id2, pPos[ 0 ], pPos[ 1 ], pPos[ 2 ] );
SetPlayerInterior(id2, GetPlayerInterior(id1));
SystemMsg(playerid, "You've teleported the player to you!");
}
else
{
return SystemMsg(playerid, "ERROR: Coulnt find Player 2");
}
}
else
{
return SystemMsg(playerid, "ERROR: Coulnt find Player 1");
}
}
else
{
return SystemMsg(playerid, "ERROR: Cannot move a person to themselfs");
}
}